pax_global_header00006660000000000000000000000064135630403520014513gustar00rootroot0000000000000052 comment=92dd653803387829ecb52d55f9f9de92ac29cd55 ocurl-0.9.0/000077500000000000000000000000001356304035200126455ustar00rootroot00000000000000ocurl-0.9.0/.gitattributes000066400000000000000000000000431356304035200155350ustar00rootroot00000000000000install-sh eol=lf configure eol=lf ocurl-0.9.0/.gitignore000066400000000000000000000006001356304035200146310ustar00rootroot00000000000000*.cm[aioxt] *.cmx[as] *.cmti *.o *.obj *.a *.lib *.dll *.so *.exe config.* .depend Makefile examples/Makefile examples/*.opt examples/opar examples/ossl examples/oput examples/ominimal examples/omulti examples/ocurl examples/ocurl_test_threads examples/test_cb_exn examples/test_lwt examples/test_lwt_unit examples/test_memory_leaks examples/test_enum /doc /print_ext /autom4te.cache ocurl-0.9.0/.travis.yml000066400000000000000000000005551356304035200147630ustar00rootroot00000000000000language: c sudo: required install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh script: bash -ex .travis-opam.sh env: - OCAML_VERSION=4.02 - OCAML_VERSION=4.03 - OCAML_VERSION=4.04 - OCAML_VERSION=4.05 - OCAML_VERSION=4.06 - OCAML_VERSION=4.07 - OCAML_VERSION=4.08 - OCAML_VERSION=4.09 os: - osx - linux ocurl-0.9.0/CHANGES.txt000066400000000000000000000123471356304035200144650ustar00rootroot000000000000000.9.0 - 13 Nov 2019 * remove duphandle * fix Curl.pause segfault with libcurl >= 7.60.0 0.8.2 - 5 Aug 2018 * deprecate duphandle + curlCode_of_int + CURLOPT_MIMEPOST + CURLOPT_SSH_KNOWNHOSTS CURLOPT_SSH_KEYFUNCTION + HTTP_VERSION_2_PRIOR_KNOWLEDGE 0.8.1 - 11 Mar 2018 + CURLOPT_POSTREDIR * fix Multi.wait on windows (Nicolas Ojeda Bar) * require libcurl >= 7.28.0 0.8.0 - 28 Nov 2017 * fix build on Windows/msvc (Nicolas Ojeda Bar) * fix debugfunction invocation * require libcurl >= 7.17.0 * less mallocs per handle + CURLOPT_USERNAME CURLOPT_PASSWORD CURLOPT_LOGIN_OPTIONS CURLOPT_CONNECT_TO + build cmxs * fix build tests with OCaml 4.06.0 0.7.10 - 12 Jun 2017 + CURL_SSLVERSION_TLSv1_3 * O(1) vs O(N) speedup for workloads with lots of short-lived concurrent connections 0.7.9 - 3 Oct 2016 * fix build with older libcurl 0.7.8 - 6 Sep 2016 + CURLOPT_PIPEWAIT + CURLOPT_CERTINFO CURLINFO_CERTINFO + CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2TLS * CURLOPT_SSLVERSION is now a variant type (backward-incompatible change) 0.7.7 - 16 May 2016 + Multi.setopt 0.7.6 - 25 Oct 2015 * fix invalid memory access in CURLOPT_HTTPPOST handling (mfp) 0.7.5 - 24 Jul 2015 * fix build with older libcurl 0.7.4 - 23 Jun 2015 * fix build 0.7.3 - 22 Jun 2015 + CURLOPT_MAIL_FROM CURLOPT_MAIL_RCPT - CURLOPT_STDERR * fix CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 and CURLOPT_INFILESIZE_LARGE * fix memory leaks in CURLOPT_HTTPPOST handling * use specific NotImplemented exception instead of generic Failure 0.7.2 - 23 Sep 2014 * fix Curl.duphandle wrt CURLOPT_DNS_SERVERS * lwt: fix memory leak * Multi: keep Curl.t alive 0.7.1 - 12 May 2014 * Multi: win32 support (arirux) + Multi.remove * lwt: handle Lwt.cancel * lwt: fix set_errorbuffer 0.7.0 - 8 Mar 2014 * Curl_lwt: basic Lwt interface * make Curl.t a custom value (with compare and hash) * set_readfunction: assert correct length, do not silently truncate data * generate ocamldoc html with `make doc` * fix build: set CFLAGS for feature tests 0.6.1 - 11 Feb 2014 * fix type of set_seekfunction * fix handling of exceptions from callbacks (break the transfer) + CURLINFO_CONDITION_UNMET TIMECOND_NONE TIMECOND_LASTMOD * fix build on windows * expose Curl.t underlying Curl.handle object * implement Curl.handle#get_redirecturl 0.6.0 - 29 Aug 2013 * introduce bindings to asynchronous multi interface + Multi: set_socket_function set_timer_function action_all action_timeout action timeout * treat SSLVERIFYHOST_EXISTENCE as SSLVERIFYHOST_HOSTNAME, previous workaround was broken * MSVC compatibility * configure: do not override CFLAGS * expose set_sshprivatekeyfile 0.5.6 - 21 Mar 2013 * configure: more robust test for libcurl 0.5.5 - 23 Feb 2013 + CURLINFO_LOCAL_IP CURLINFO_LOCAL_PORT + pause + compatibility fixes for old libcurl versions 0.5.4 - 29 Jan 2013 Makefile: add release target add CHANGES.txt Makefile: add distclean target Older changes: 2012 version_info: return features as list of strings more version info fields replace SSLVERIFYHOST_EXISTENCE with SSLVERIFYHOST_HOSTNAME for new libcurl + CURLOPT_RESOLVE CURLOPT_DNS_SERVERS + CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS update Copyright fix free_curl_slist (crash with 7.24.0) Makefile: add uninstall target update ocaml m4 macros (in particular ocamlfind will be used by default, if present) + CURLINFO_PRIMARY_IP 2011 + CURLOPT_PROXYTYPE + CURLOPT_OPENSOCKETFUNCTION + SSLVERIFYHOST_NONE support CURLOPT_AUTOREFERER 2010 + version_info fix: memory leak in curl_slist handling disable checkConnection (kills performance with many handles) support CURLINFO_REDIRECT_URL tabs -> spaces fix: double free (connection->range) support all encodings fix: CURLINFO_FILETIME has type long add errno add strerror, return curlCode from remove_finished actually retrieve CURLINFO_FTP_ENTRY_PATH fix typo HAVE_DECL_CURLINFO_HTTP_CONNECTCODE remove CURLE_FTP_SSL_FAILED (breaks int to curlCode conversion) add README for ocaml/msvc build fix crash bug (use Store_field) in raiseError fix: do not use Store_field on Abstract_tag blocks install with ocamlfind on windows too fix ocamlfind installation wrap CURLM* as custom value fix build (build dllcurl-helper.dll once) link with ws2_32.dll for select for curlm_wait_data use explicit -dllpath in examples (so that examples work without installing) start use ocamlmklib tweak code and Makefile for msvc build 2009 test code for threads + Curl.reset fix crash: NULL from curl_easy_getinfo fix: helper_* functions should return Val_unit examples/omulti: accept command-line args build dllcurl-helper (partially merged deb patch) + examples/omulti fix crash bug (use Store_field) + Multi.{add,perform,wait} + Connection_val + Curl.Multi.remove_finished make -Wall happier fix error in seekFunction start Curl.Multi fix locking in callbacks start from ocurl 0.5.1 ocurl-0.9.0/COPYING000066400000000000000000000021601356304035200136770ustar00rootroot00000000000000Copyright (c) 2003, Lars Nilsson, Copyright (c) 2009, ygrek, Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ocurl-0.9.0/META000066400000000000000000000005031356304035200133140ustar00rootroot00000000000000name="curl" version="" description="bindings to libcurl" requires="unix" archive(byte)="curl.cma" archive(native)="curl.cmxa" package "lwt" ( version = "" description = "lwt interface to libcurl" requires = "curl lwt.unix" archive(byte) = "curl_lwt.cmo" archive(native) = "curl_lwt.cmx" exists_if = "curl_lwt.cmo" ) ocurl-0.9.0/Makefile.in000066400000000000000000000077501356304035200147230ustar00rootroot00000000000000### ### @configure_input@ ### .PHONY: all targets examples install clean distclean depend release doc build test reinstall gen .SUFFIXES: .ml .mli .cmx .cmi .cmo .cmxs .cmxa .cma .c @EXT_OBJ@ INSTALLDIR = @INSTALLDIR@ INSTALL = @INSTALL@ INSTALLDATA = @INSTALL_DATA@ FINDLIB = @OCAMLFIND@ OCAMLC = @OCAMLC@ OCAMLOPT = @OCAMLOPT@ OCAMLDEP = @OCAMLDEP@ OCAMLMKLIB = @OCAMLMKLIB@ EXT_LIB = @EXT_LIB@ EXT_OBJ = @EXT_OBJ@ EXT_DLL = @EXT_DLL@ FLAGS = -g ifeq (@OCAML_HAS_BIN_ANNOT@,yes) FLAGS += -bin-annot endif LIBS = CFLAGS = @CFLAGS@ @DEFS@ -Wall -Wundef CURLHELPEROBJS = curl-helper$(EXT_OBJ) CURLOBJS = curl.cmx CURLBCOBJS = $(CURLOBJS:.cmx=.cmo) CLIBS = @CURLLIBS@ TARGETS := curl.cma libcurl-helper$(EXT_LIB) dllcurl-helper$(EXT_DLL) ifneq (@OCAML_PKG_lwt_unix@,no) TARGETS += curl_lwt.cmo endif ifeq (@OCAMLBEST@,opt) TARGETS += curl.cmxa curl.cmx curl.cmxs ifneq (@OCAML_PKG_lwt_unix@,no) TARGETS += curl_lwt.cmx curl_lwt.cmxs endif endif INSTALL_TARGETS = curl$(EXT_LIB) curl.cmi curl.mli $(TARGETS) ifeq (@OCAML_HAS_BIN_ANNOT@,yes) INSTALL_TARGETS += curl.cmt curl.cmti endif ifneq (@OCAML_PKG_lwt_unix@,no) INSTALL_TARGETS += curl_lwt.cmi curl_lwt.mli curl_lwt$(EXT_OBJ) ifeq (@OCAML_HAS_BIN_ANNOT@,yes) INSTALL_TARGETS += curl_lwt.cmt curl_lwt.cmti endif endif all: @$(MAKE) depend @$(MAKE) $(TARGETS) build: all test: examples examples/test_cb_exn examples/test_memory_leaks ifneq (@OCAML_PKG_lwt_unix@,no) examples/test_lwt_unit endif ifeq (@OCAMLBEST@,opt) examples/test_cb_exn.opt examples/test_memory_leaks.opt ifneq (@OCAML_PKG_lwt_unix@,no) examples/test_lwt_unit.opt endif endif gen: all (cd examples; $(MAKE) test_enum) examples/test_enum doc: mkdir -p doc ifneq (@OCAML_PKG_lwt_unix@,no) ocamlfind ocamldoc -html -d doc -package lwt curl.mli curl_lwt.mli else ocamldoc -html -d doc curl.mli endif examples: all (cd examples; $(MAKE)) curl.cma: $(CURLBCOBJS) dllcurl-helper$(EXT_DLL) $(OCAMLMKLIB) -o curl $(CURLBCOBJS) -oc curl-helper $(CLIBS) curl.cmxa: $(CURLOBJS) dllcurl-helper$(EXT_DLL) $(OCAMLMKLIB) -o curl $(CURLOBJS) -oc curl-helper $(CLIBS) curl.cmxs: curl.cmxa $(OCAMLOPT) -shared -linkall -I . $< -o $@ curl_lwt.cmo: curl_lwt.ml $(FINDLIB) c -package lwt.unix -c $(FLAGS) $< -o $@ curl_lwt.cmx: curl_lwt.ml $(FINDLIB) opt -package lwt.unix -c $(FLAGS) $< -o $@ curl_lwt.cmxs: curl_lwt.cmx $(FINDLIB) opt -shared -linkall -package lwt.unix $< -o $@ curl_lwt.cmi: curl_lwt.mli $(FINDLIB) c -package lwt -c $(FLAGS) $< -o $@ .ml.cmx: $(OCAMLOPT) -c $(FLAGS) $< -o $@ .mli.cmi: $(OCAMLC) -c $(FLAGS) $< -o $@ .ml.cmo: $(OCAMLC) -c $(FLAGS) $< -o $@ libcurl-helper$(EXT_LIB) dllcurl-helper$(EXT_DLL): $(CURLHELPEROBJS) $(OCAMLMKLIB) -oc curl-helper $(CURLHELPEROBJS) $(CLIBS) .c$(EXT_OBJ): $(OCAMLC) -c -ccopt "$(CFLAGS)" $< install: ifneq (@OCAMLFIND@,no) $(FINDLIB) install -patch-version @PACKAGE_VERSION@ -ldconf ignore curl META $(INSTALL_TARGETS) else mkdir -p $(INSTALLDIR) $(INSTALLDATA) curl.cma $(INSTALLDIR) ifeq (@OCAMLBEST@,opt) $(INSTALLDATA) curl.cmxa $(INSTALLDIR) endif $(INSTALLDATA) curl.mli curl.cmi $(INSTALLDIR) $(INSTALLDATA) curl$(EXT_LIB) libcurl-helper$(EXT_LIB) $(INSTALLDIR) endif uninstall: ifneq (@OCAMLFIND@,no) $(FINDLIB) remove curl else (cd $(INSTALLDIR) && rm -f curl.cma curl.cmxa curl.mli curl.cmi curl$(EXT_LIB) libcurl-helper$(EXT_LIB)) rmdir $(INSTALLDIR) endif reinstall: $(MAKE) uninstall $(MAKE) install NAME=@PACKAGE_NAME@-@PACKAGE_VERSION@ release: git tag -a -m @PACKAGE_VERSION@ @PACKAGE_VERSION@ git archive --prefix=$(NAME)/ @PACKAGE_VERSION@ | gzip > $(NAME).tar.gz gpg -a -b $(NAME).tar.gz clean: @rm -f $(TARGETS) *~ *.cm* *$(EXT_OBJ) *$(EXT_LIB) *$(EXT_DLL) .depend core @(cd examples; $(MAKE) clean) distclean: clean @rm -f config.log config.status config.h examples/Makefile @rm -f Makefile depend: @$(OCAMLDEP) *.mli $(filter-out errors.ml print_ext.ml, $(wildcard *.ml)) > .depend ifeq ($(wildcard .depend),.depend) ifneq ($(MAKECMDGOALS),clean) include .depend endif endif ocurl-0.9.0/Makefile.msvc000066400000000000000000000031121356304035200152510ustar00rootroot00000000000000### -*- Makefile -*- ### Makefile.msvc ### # libcurl directory CURLDIR = C:/cygwin/home/me/curl-7.54.1 ##################### .PHONY: all targets examples install clean depend .SUFFIXES: .ml .mli .cmx .cmi .cmo .cmxa .cma .c .obj OCBYTE = ocamlc OCOPT = ocamlopt OC = ocamlc CC = cl FLAGS = CFLAGS = CURLINCDIR = -I $(CURLDIR)/include # PR#4783 OCAMLMKLIB = ocamlmklib -v -ocamlc ocamlc -ocamlopt ocamlopt CURLHELPEROBJS = curl-helper.obj CURLOBJS = curl.cmx CURLBCOBJS = $(CURLOBJS:.cmx=.cmo) CURLFLAGS = CURLCLIBS = ws2_32.lib TARGETS = curl.cma curl.cmxa all: @$(MAKE) -f Makefile.msvc depend @$(MAKE) -f Makefile.msvc targets targets: $(TARGETS) examples: $(TARGETS) $(MAKE) -C examples -f Makefile.windows curl.cma: curl.cmi $(CURLBCOBJS) dllcurl-helper.dll $(OCAMLMKLIB) -o curl $(CURLBCOBJS) -oc curl-helper curl.cmxa: curl.cmi $(CURLOBJS) libcurl-helper.lib $(OCAMLMKLIB) -o curl $(CURLOBJS) -oc curl-helper .ml.cmx: $(OCOPT) -c $(FLAGS) $< -o $@ .mli.cmi: $(OCBYTE) -c $(FLAGS) $< -o $@ .ml.cmo: $(OCBYTE) -c $(FLAGS) $< -o $@ libcurl-helper.lib dllcurl-helper.dll: $(CURLHELPEROBJS) $(OCAMLMKLIB) -oc curl-helper $(CURLHELPEROBJS) $(CURLCLIBS) .c.obj: $(OC) -c $(CFLAGS) -ccopt -DHAVE_CONFIG_H $(CURLINCDIR) -ccopt /Tp $< -o $@ install: ocamlfind install -ldconf ignore curl META $(wildcard *.cmi *.lib *.cma *.cmxa *.cmx *.dll *.mli) uninstall: ocamlfind remove curl clean: @rm -f $(TARGETS) *~ *.cm* *.obj *.lib *.dll .depend core @$(MAKE) -C examples -f Makefile.windows clean depend: @ocamldep *.mli *.ml > .depend -include .depend ocurl-0.9.0/README.md000066400000000000000000000026221356304035200141260ustar00rootroot00000000000000 ocurl - OCaml libcurl bindings ============================== [![Build Status](https://travis-ci.org/ygrek/ocurl.svg?branch=master)](https://travis-ci.org/ygrek/ocurl) [![Build status](https://ci.appveyor.com/api/projects/status/b20uqxaeyarwy2s4/branch/master?svg=true)](https://ci.appveyor.com/project/ygrek/ocurl/branch/master) Homepage: https://ygrek.org.ua/p/ocurl OCaml bindings to libcurl - client-side URL transfer library, supporting HTTP and a multitude of other network protocols. This is a continuation of ocurl project by Lars Nilsson, previously hosted at http://ocurl.sourceforge.net/ Minimum supported libcurl version : 7.28.0 Building on Windows with ocaml/msvc =================================== Requirements ------------ * libcurl devel for msvc * working ocaml/msvc setup (ocaml and msvc tools in PATH) * ocamlfind * GNU make Build ----- Edit `Makefile.msvc` and make CURLDIR variable point to the root directory of libcurl installation. Copy `config.h.windows` to `config.h`. Compile with `make -f Makefile.msvc`. Install with `make -f Makefile.msvc install`. Compile examples with `make -f Makefile.msvc examples`. Making release ============== * Check `make gen` with latest libcurl * Update CHANGES.txt * Update version in configure.ac * autoreconf * commit * ./configure && make release ---- ygrek at autistici dot org ocurl-0.9.0/aclocal.m4000066400000000000000000000134501356304035200145100ustar00rootroot00000000000000dnl autoconf macros for OCaml dnl dnl Copyright © 2009 Richard W.M. Jones dnl Copyright © 2009 Stefano Zacchiroli dnl Copyright © 2000-2005 Olivier Andrieu dnl Copyright © 2000-2005 Jean-Christophe Filliâtre dnl Copyright © 2000-2005 Georges Mariano dnl dnl For documentation, please read the ocaml.m4 man page. AC_DEFUN([AC_PROG_OCAML], [dnl # checking for ocamlc AC_CHECK_TOOL([OCAMLC],[ocamlc],[no]) if test "$OCAMLC" != "no"; then OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'` AC_MSG_RESULT([OCaml version is $OCAMLVERSION]) # If OCAMLLIB is set, use it if test "$OCAMLLIB" = ""; then OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4` else AC_MSG_RESULT([OCAMLLIB previously set; preserving it.]) fi AC_MSG_RESULT([OCaml library path is $OCAMLLIB]) AC_SUBST([OCAMLVERSION]) AC_SUBST([OCAMLLIB]) # checking for ocamlopt AC_CHECK_TOOL([OCAMLOPT],[ocamlopt],[no]) OCAMLBEST=byte if test "$OCAMLOPT" = "no"; then AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.]) else TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.]) OCAMLOPT=no else OCAMLBEST=opt fi fi AC_SUBST([OCAMLBEST]) # checking for ocamlc.opt AC_CHECK_TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no]) if test "$OCAMLCDOTOPT" != "no"; then TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([versions differs from ocamlc; ocamlc.opt discarded.]) else OCAMLC=$OCAMLCDOTOPT fi fi # checking for ocamlopt.opt if test "$OCAMLOPT" != "no" ; then AC_CHECK_TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no]) if test "$OCAMLOPTDOTOPT" != "no"; then TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([version differs from ocamlc; ocamlopt.opt discarded.]) else OCAMLOPT=$OCAMLOPTDOTOPT fi fi fi AC_SUBST([OCAMLOPT]) fi AC_SUBST([OCAMLC]) # checking for ocaml toplevel AC_CHECK_TOOL([OCAML],[ocaml],[no]) # checking for ocamldep AC_CHECK_TOOL([OCAMLDEP],[ocamldep],[no]) # checking for ocamlmktop AC_CHECK_TOOL([OCAMLMKTOP],[ocamlmktop],[no]) # checking for ocamlmklib AC_CHECK_TOOL([OCAMLMKLIB],[ocamlmklib],[no]) # checking for ocamldoc AC_CHECK_TOOL([OCAMLDOC],[ocamldoc],[no]) # checking for ocamlbuild AC_CHECK_TOOL([OCAMLBUILD],[ocamlbuild],[no]) ]) AC_DEFUN([AC_PROG_OCAMLLEX], [dnl # checking for ocamllex AC_CHECK_TOOL([OCAMLLEX],[ocamllex],[no]) if test "$OCAMLLEX" != "no"; then AC_CHECK_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no]) if test "$OCAMLLEXDOTOPT" != "no"; then OCAMLLEX=$OCAMLLEXDOTOPT fi fi AC_SUBST([OCAMLLEX]) ]) AC_DEFUN([AC_PROG_OCAMLYACC], [dnl AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no]) AC_SUBST([OCAMLYACC]) ]) AC_DEFUN([AC_PROG_CAMLP4], [dnl AC_REQUIRE([AC_PROG_OCAML])dnl # checking for camlp4 AC_CHECK_TOOL([CAMLP4],[camlp4],[no]) if test "$CAMLP4" != "no"; then TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'` if test "$TMPVERSION" != "$OCAMLVERSION" ; then AC_MSG_RESULT([versions differs from ocamlc]) CAMLP4=no fi fi AC_SUBST([CAMLP4]) # checking for companion tools AC_CHECK_TOOL([CAMLP4BOOT],[camlp4boot],[no]) AC_CHECK_TOOL([CAMLP4O],[camlp4o],[no]) AC_CHECK_TOOL([CAMLP4OF],[camlp4of],[no]) AC_CHECK_TOOL([CAMLP4OOF],[camlp4oof],[no]) AC_CHECK_TOOL([CAMLP4ORF],[camlp4orf],[no]) AC_CHECK_TOOL([CAMLP4PROF],[camlp4prof],[no]) AC_CHECK_TOOL([CAMLP4R],[camlp4r],[no]) AC_CHECK_TOOL([CAMLP4RF],[camlp4rf],[no]) AC_SUBST([CAMLP4BOOT]) AC_SUBST([CAMLP4O]) AC_SUBST([CAMLP4OF]) AC_SUBST([CAMLP4OOF]) AC_SUBST([CAMLP4ORF]) AC_SUBST([CAMLP4PROF]) AC_SUBST([CAMLP4R]) AC_SUBST([CAMLP4RF]) ]) AC_DEFUN([AC_PROG_FINDLIB], [dnl AC_REQUIRE([AC_PROG_OCAML])dnl # checking for ocamlfind AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no]) AC_SUBST([OCAMLFIND]) ]) dnl Thanks to Jim Meyering for working this next bit out for us. dnl XXX We should define AS_TR_SH if it's not defined already dnl (eg. for old autoconf). AC_DEFUN([AC_CHECK_OCAML_PKG], [dnl AC_REQUIRE([AC_PROG_FINDLIB])dnl AC_MSG_CHECKING([for OCaml findlib package $1]) unset found unset pkg found=no for pkg in $1 $2 ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then AC_MSG_RESULT([found]) AS_TR_SH([OCAML_PKG_$1])=$pkg found=yes break fi done if test "$found" = "no" ; then AC_MSG_RESULT([not found]) AS_TR_SH([OCAML_PKG_$1])=no fi AC_SUBST(AS_TR_SH([OCAML_PKG_$1])) ]) AC_DEFUN([AC_CHECK_OCAML_MODULE], [dnl AC_MSG_CHECKING([for OCaml module $2]) cat > conftest.ml <&5 2>&5 ; then found=yes break fi done if test "$found" ; then AC_MSG_RESULT([$$1]) else AC_MSG_RESULT([not found]) $1=no fi AC_SUBST([$1]) ]) dnl XXX Cross-compiling AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE], [dnl AC_REQUIRE([AC_PROG_OCAML])dnl AC_MSG_CHECKING([for OCaml compiler word size]) cat > conftest.ml < conftest.ml < header file. */ #undef HAVE_CURL_CURL_H /* Define to 1 if you have the declaration of `CURLE_ABORTED_BY_CALLBACK', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_ABORTED_BY_CALLBACK /* Define to 1 if you have the declaration of `CURLE_AGAIN', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_AGAIN /* Define to 1 if you have the declaration of `CURLE_BAD_CALLING_ORDER', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_BAD_CALLING_ORDER /* Define to 1 if you have the declaration of `CURLE_BAD_CONTENT_ENCODING', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_BAD_CONTENT_ENCODING /* Define to 1 if you have the declaration of `CURLE_BAD_DOWNLOAD_RESUME', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_BAD_DOWNLOAD_RESUME /* Define to 1 if you have the declaration of `CURLE_BAD_FUNCTION_ARGUMENT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_BAD_FUNCTION_ARGUMENT /* Define to 1 if you have the declaration of `CURLE_BAD_PASSWORD_ENTERED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_BAD_PASSWORD_ENTERED /* Define to 1 if you have the declaration of `CURLE_CONV_FAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_CONV_FAILED /* Define to 1 if you have the declaration of `CURLE_CONV_REQD', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_CONV_REQD /* Define to 1 if you have the declaration of `CURLE_COULDNT_CONNECT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_COULDNT_CONNECT /* Define to 1 if you have the declaration of `CURLE_COULDNT_RESOLVE_HOST', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_COULDNT_RESOLVE_HOST /* Define to 1 if you have the declaration of `CURLE_COULDNT_RESOLVE_PROXY', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_COULDNT_RESOLVE_PROXY /* Define to 1 if you have the declaration of `CURLE_FAILED_INIT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FAILED_INIT /* Define to 1 if you have the declaration of `CURLE_FILESIZE_EXCEEDED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FILESIZE_EXCEEDED /* Define to 1 if you have the declaration of `CURLE_FILE_COULDNT_READ_FILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FILE_COULDNT_READ_FILE /* Define to 1 if you have the declaration of `CURLE_FTP_ACCESS_DENIED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_ACCESS_DENIED /* Define to 1 if you have the declaration of `CURLE_FTP_CANT_GET_HOST', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_CANT_GET_HOST /* Define to 1 if you have the declaration of `CURLE_FTP_CANT_RECONNECT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_CANT_RECONNECT /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_GET_SIZE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_COULDNT_GET_SIZE /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_RETR_FILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_COULDNT_RETR_FILE /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_SET_ASCII', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_COULDNT_SET_ASCII /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_SET_BINARY', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_COULDNT_SET_BINARY /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_STOR_FILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_COULDNT_STOR_FILE /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_USE_REST', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_COULDNT_USE_REST /* Define to 1 if you have the declaration of `CURLE_FTP_PORT_FAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_PORT_FAILED /* Define to 1 if you have the declaration of `CURLE_FTP_QUOTE_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_QUOTE_ERROR /* Define to 1 if you have the declaration of `CURLE_FTP_SSL_FAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_SSL_FAILED /* Define to 1 if you have the declaration of `CURLE_FTP_USER_PASSWORD_INCORRECT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_USER_PASSWORD_INCORRECT /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_227_FORMAT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_WEIRD_227_FORMAT /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_PASS_REPLY', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_WEIRD_PASS_REPLY /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_PASV_REPLY', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_WEIRD_PASV_REPLY /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_SERVER_REPLY', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_WEIRD_SERVER_REPLY /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_USER_REPLY', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_WEIRD_USER_REPLY /* Define to 1 if you have the declaration of `CURLE_FTP_WRITE_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FTP_WRITE_ERROR /* Define to 1 if you have the declaration of `CURLE_FUNCTION_NOT_FOUND', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_FUNCTION_NOT_FOUND /* Define to 1 if you have the declaration of `CURLE_GOT_NOTHING', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_GOT_NOTHING /* Define to 1 if you have the declaration of `CURLE_HTTP_POST_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_HTTP_POST_ERROR /* Define to 1 if you have the declaration of `CURLE_HTTP_RANGE_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_HTTP_RANGE_ERROR /* Define to 1 if you have the declaration of `CURLE_HTTP_RETURNED_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_HTTP_RETURNED_ERROR /* Define to 1 if you have the declaration of `CURLE_INTERFACE_FAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_INTERFACE_FAILED /* Define to 1 if you have the declaration of `CURLE_LDAP_CANNOT_BIND', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_LDAP_CANNOT_BIND /* Define to 1 if you have the declaration of `CURLE_LDAP_INVALID_URL', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_LDAP_INVALID_URL /* Define to 1 if you have the declaration of `CURLE_LDAP_SEARCH_FAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_LDAP_SEARCH_FAILED /* Define to 1 if you have the declaration of `CURLE_LIBRARY_NOT_FOUND', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_LIBRARY_NOT_FOUND /* Define to 1 if you have the declaration of `CURLE_LOGIN_DENIED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_LOGIN_DENIED /* Define to 1 if you have the declaration of `CURLE_MALFORMAT_USER', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_MALFORMAT_USER /* Define to 1 if you have the declaration of `CURLE_OPERATION_TIMEOUTED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_OPERATION_TIMEOUTED /* Define to 1 if you have the declaration of `CURLE_OUT_OF_MEMORY', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_OUT_OF_MEMORY /* Define to 1 if you have the declaration of `CURLE_PARTIAL_FILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_PARTIAL_FILE /* Define to 1 if you have the declaration of `CURLE_READ_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_READ_ERROR /* Define to 1 if you have the declaration of `CURLE_RECV_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_RECV_ERROR /* Define to 1 if you have the declaration of `CURLE_REMOTE_DISK_FULL', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_REMOTE_DISK_FULL /* Define to 1 if you have the declaration of `CURLE_REMOTE_FILE_EXISTS', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_REMOTE_FILE_EXISTS /* Define to 1 if you have the declaration of `CURLE_REMOTE_FILE_NOT_FOUND', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_REMOTE_FILE_NOT_FOUND /* Define to 1 if you have the declaration of `CURLE_SEND_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SEND_ERROR /* Define to 1 if you have the declaration of `CURLE_SEND_FAIL_REWIND', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SEND_FAIL_REWIND /* Define to 1 if you have the declaration of `CURLE_SHARE_IN_USE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SHARE_IN_USE /* Define to 1 if you have the declaration of `CURLE_SSH', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSH /* Define to 1 if you have the declaration of `CURLE_SSL_CACERT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_CACERT /* Define to 1 if you have the declaration of `CURLE_SSL_CACERT_BADFILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_CACERT_BADFILE /* Define to 1 if you have the declaration of `CURLE_SSL_CERTPROBLEM', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_CERTPROBLEM /* Define to 1 if you have the declaration of `CURLE_SSL_CIPHER', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_CIPHER /* Define to 1 if you have the declaration of `CURLE_SSL_CONNECT_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_CONNECT_ERROR /* Define to 1 if you have the declaration of `CURLE_SSL_ENGINE_INITFAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_ENGINE_INITFAILED /* Define to 1 if you have the declaration of `CURLE_SSL_ENGINE_NOTFOUND', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_ENGINE_NOTFOUND /* Define to 1 if you have the declaration of `CURLE_SSL_ENGINE_SETFAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_ENGINE_SETFAILED /* Define to 1 if you have the declaration of `CURLE_SSL_PEER_CERTIFICATE', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_PEER_CERTIFICATE /* Define to 1 if you have the declaration of `CURLE_SSL_SHUTDOWN_FAILED', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_SSL_SHUTDOWN_FAILED /* Define to 1 if you have the declaration of `CURLE_TELNET_OPTION_SYNTAX', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_TELNET_OPTION_SYNTAX /* Define to 1 if you have the declaration of `CURLE_TFTP_ILLEGAL', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_TFTP_ILLEGAL /* Define to 1 if you have the declaration of `CURLE_TFTP_NOSUCHUSER', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_TFTP_NOSUCHUSER /* Define to 1 if you have the declaration of `CURLE_TFTP_NOTFOUND', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_TFTP_NOTFOUND /* Define to 1 if you have the declaration of `CURLE_TFTP_PERM', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_TFTP_PERM /* Define to 1 if you have the declaration of `CURLE_TFTP_UNKNOWNID', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_TFTP_UNKNOWNID /* Define to 1 if you have the declaration of `CURLE_TOO_MANY_REDIRECTS', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_TOO_MANY_REDIRECTS /* Define to 1 if you have the declaration of `CURLE_UNKNOWN_TELNET_OPTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_UNKNOWN_TELNET_OPTION /* Define to 1 if you have the declaration of `CURLE_UNSUPPORTED_PROTOCOL', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_UNSUPPORTED_PROTOCOL /* Define to 1 if you have the declaration of `CURLE_URL_MALFORMAT', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_URL_MALFORMAT /* Define to 1 if you have the declaration of `CURLE_URL_MALFORMAT_USER', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_URL_MALFORMAT_USER /* Define to 1 if you have the declaration of `CURLE_WRITE_ERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLE_WRITE_ERROR /* Define to 1 if you have the declaration of `CURLINFO_CERTINFO', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_CERTINFO /* Define to 1 if you have the declaration of `CURLINFO_CONDITION_UNMET', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_CONDITION_UNMET /* Define to 1 if you have the declaration of `CURLINFO_CONNECT_TIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_CONNECT_TIME /* Define to 1 if you have the declaration of `CURLINFO_CONTENT_LENGTH_DOWNLOAD', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_CONTENT_LENGTH_DOWNLOAD /* Define to 1 if you have the declaration of `CURLINFO_CONTENT_LENGTH_UPLOAD', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_CONTENT_LENGTH_UPLOAD /* Define to 1 if you have the declaration of `CURLINFO_CONTENT_TYPE', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_CONTENT_TYPE /* Define to 1 if you have the declaration of `CURLINFO_COOKIELIST', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_COOKIELIST /* Define to 1 if you have the declaration of `CURLINFO_EFFECTIVE_URL', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_EFFECTIVE_URL /* Define to 1 if you have the declaration of `CURLINFO_FILETIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_FILETIME /* Define to 1 if you have the declaration of `CURLINFO_FTP_ENTRY_PATH', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_FTP_ENTRY_PATH /* Define to 1 if you have the declaration of `CURLINFO_HEADER_SIZE', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_HEADER_SIZE /* Define to 1 if you have the declaration of `CURLINFO_HTTPAUTH_AVAIL', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_HTTPAUTH_AVAIL /* Define to 1 if you have the declaration of `CURLINFO_HTTP_CONNECTCODE', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_HTTP_CONNECTCODE /* Define to 1 if you have the declaration of `CURLINFO_LASTSOCKET', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_LASTSOCKET /* Define to 1 if you have the declaration of `CURLINFO_LOCAL_IP', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_LOCAL_IP /* Define to 1 if you have the declaration of `CURLINFO_LOCAL_PORT', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_LOCAL_PORT /* Define to 1 if you have the declaration of `CURLINFO_NAMELOOKUP_TIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_NAMELOOKUP_TIME /* Define to 1 if you have the declaration of `CURLINFO_NUM_CONNECTS', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_NUM_CONNECTS /* Define to 1 if you have the declaration of `CURLINFO_OS_ERRNO', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_OS_ERRNO /* Define to 1 if you have the declaration of `CURLINFO_PRETRANSFER_TIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_PRETRANSFER_TIME /* Define to 1 if you have the declaration of `CURLINFO_PRIMARY_IP', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_PRIMARY_IP /* Define to 1 if you have the declaration of `CURLINFO_PROXYAUTH_AVAIL', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_PROXYAUTH_AVAIL /* Define to 1 if you have the declaration of `CURLINFO_REDIRECT_COUNT', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_REDIRECT_COUNT /* Define to 1 if you have the declaration of `CURLINFO_REDIRECT_TIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_REDIRECT_TIME /* Define to 1 if you have the declaration of `CURLINFO_REDIRECT_URL', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_REDIRECT_URL /* Define to 1 if you have the declaration of `CURLINFO_REQUEST_SIZE', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_REQUEST_SIZE /* Define to 1 if you have the declaration of `CURLINFO_RESPONSE_CODE', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_RESPONSE_CODE /* Define to 1 if you have the declaration of `CURLINFO_SIZE_DOWNLOAD', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_SIZE_DOWNLOAD /* Define to 1 if you have the declaration of `CURLINFO_SIZE_UPLOAD', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_SIZE_UPLOAD /* Define to 1 if you have the declaration of `CURLINFO_SPEED_DOWNLOAD', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_SPEED_DOWNLOAD /* Define to 1 if you have the declaration of `CURLINFO_SPEED_UPLOAD', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_SPEED_UPLOAD /* Define to 1 if you have the declaration of `CURLINFO_SSL_ENGINES', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_SSL_ENGINES /* Define to 1 if you have the declaration of `CURLINFO_SSL_VERIFYRESULT', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_SSL_VERIFYRESULT /* Define to 1 if you have the declaration of `CURLINFO_STARTTRANSFER_TIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_STARTTRANSFER_TIME /* Define to 1 if you have the declaration of `CURLINFO_TOTAL_TIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLINFO_TOTAL_TIME /* Define to 1 if you have the declaration of `CURLMOPT_MAXCONNECTS', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_MAXCONNECTS /* Define to 1 if you have the declaration of `CURLMOPT_MAX_HOST_CONNECTIONS', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_MAX_HOST_CONNECTIONS /* Define to 1 if you have the declaration of `CURLMOPT_MAX_PIPELINE_LENGTH', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_MAX_PIPELINE_LENGTH /* Define to 1 if you have the declaration of `CURLMOPT_PIPELINING', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_PIPELINING /* Define to 1 if you have the declaration of `CURLMOPT_SOCKETDATA', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_SOCKETDATA /* Define to 1 if you have the declaration of `CURLMOPT_SOCKETFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_SOCKETFUNCTION /* Define to 1 if you have the declaration of `CURLMOPT_TIMERDATA', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_TIMERDATA /* Define to 1 if you have the declaration of `CURLMOPT_TIMERFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLMOPT_TIMERFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_AUTOREFERER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_AUTOREFERER /* Define to 1 if you have the declaration of `CURLOPT_BUFFERSIZE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_BUFFERSIZE /* Define to 1 if you have the declaration of `CURLOPT_CAINFO', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CAINFO /* Define to 1 if you have the declaration of `CURLOPT_CAPATH', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CAPATH /* Define to 1 if you have the declaration of `CURLOPT_CERTINFO', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CERTINFO /* Define to 1 if you have the declaration of `CURLOPT_CLOSEPOLICY', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CLOSEPOLICY /* Define to 1 if you have the declaration of `CURLOPT_CONNECTTIMEOUT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CONNECTTIMEOUT /* Define to 1 if you have the declaration of `CURLOPT_CONNECTTIMEOUT_MS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CONNECTTIMEOUT_MS /* Define to 1 if you have the declaration of `CURLOPT_CONNECT_ONLY', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CONNECT_ONLY /* Define to 1 if you have the declaration of `CURLOPT_CONNECT_TO', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CONNECT_TO /* Define to 1 if you have the declaration of `CURLOPT_COOKIE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_COOKIE /* Define to 1 if you have the declaration of `CURLOPT_COOKIEFILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_COOKIEFILE /* Define to 1 if you have the declaration of `CURLOPT_COOKIEJAR', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_COOKIEJAR /* Define to 1 if you have the declaration of `CURLOPT_COOKIELIST', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_COOKIELIST /* Define to 1 if you have the declaration of `CURLOPT_COOKIESESSION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_COOKIESESSION /* Define to 1 if you have the declaration of `CURLOPT_COPYPOSTFIELDS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_COPYPOSTFIELDS /* Define to 1 if you have the declaration of `CURLOPT_CRLF', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CRLF /* Define to 1 if you have the declaration of `CURLOPT_CUSTOMREQUEST', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_CUSTOMREQUEST /* Define to 1 if you have the declaration of `CURLOPT_DEBUGDATA', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_DEBUGDATA /* Define to 1 if you have the declaration of `CURLOPT_DEBUGFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_DEBUGFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_DNS_CACHE_TIMEOUT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_DNS_CACHE_TIMEOUT /* Define to 1 if you have the declaration of `CURLOPT_DNS_SERVERS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_DNS_SERVERS /* Define to 1 if you have the declaration of `CURLOPT_DNS_USE_GLOBAL_CACHE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_DNS_USE_GLOBAL_CACHE /* Define to 1 if you have the declaration of `CURLOPT_EGDSOCKET', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_EGDSOCKET /* Define to 1 if you have the declaration of `CURLOPT_ENCODING', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_ENCODING /* Define to 1 if you have the declaration of `CURLOPT_ERRORBUFFER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_ERRORBUFFER /* Define to 1 if you have the declaration of `CURLOPT_FAILONERROR', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FAILONERROR /* Define to 1 if you have the declaration of `CURLOPT_FILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FILE /* Define to 1 if you have the declaration of `CURLOPT_FILETIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FILETIME /* Define to 1 if you have the declaration of `CURLOPT_FOLLOWLOCATION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FOLLOWLOCATION /* Define to 1 if you have the declaration of `CURLOPT_FORBID_REUSE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FORBID_REUSE /* Define to 1 if you have the declaration of `CURLOPT_FRESH_CONNECT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FRESH_CONNECT /* Define to 1 if you have the declaration of `CURLOPT_FTPAPPEND', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTPAPPEND /* Define to 1 if you have the declaration of `CURLOPT_FTPLISTONLY', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTPLISTONLY /* Define to 1 if you have the declaration of `CURLOPT_FTPPORT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTPPORT /* Define to 1 if you have the declaration of `CURLOPT_FTPSSLAUTH', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTPSSLAUTH /* Define to 1 if you have the declaration of `CURLOPT_FTP_ACCOUNT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_ACCOUNT /* Define to 1 if you have the declaration of `CURLOPT_FTP_ALTERNATIVE_TO_USER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_ALTERNATIVE_TO_USER /* Define to 1 if you have the declaration of `CURLOPT_FTP_CREATE_MISSING_DIRS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_CREATE_MISSING_DIRS /* Define to 1 if you have the declaration of `CURLOPT_FTP_FILEMETHOD', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_FILEMETHOD /* Define to 1 if you have the declaration of `CURLOPT_FTP_RESPONSE_TIMEOUT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_RESPONSE_TIMEOUT /* Define to 1 if you have the declaration of `CURLOPT_FTP_SKIP_PASV_IP', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_SKIP_PASV_IP /* Define to 1 if you have the declaration of `CURLOPT_FTP_SSL', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_SSL /* Define to 1 if you have the declaration of `CURLOPT_FTP_SSL_CCC', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_SSL_CCC /* Define to 1 if you have the declaration of `CURLOPT_FTP_USE_EPRT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_USE_EPRT /* Define to 1 if you have the declaration of `CURLOPT_FTP_USE_EPSV', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_FTP_USE_EPSV /* Define to 1 if you have the declaration of `CURLOPT_HEADER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HEADER /* Define to 1 if you have the declaration of `CURLOPT_HEADERFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HEADERFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_HTTP200ALIASES', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTP200ALIASES /* Define to 1 if you have the declaration of `CURLOPT_HTTPAUTH', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTPAUTH /* Define to 1 if you have the declaration of `CURLOPT_HTTPGET', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTPGET /* Define to 1 if you have the declaration of `CURLOPT_HTTPHEADER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTPHEADER /* Define to 1 if you have the declaration of `CURLOPT_HTTPPOST', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTPPOST /* Define to 1 if you have the declaration of `CURLOPT_HTTPPROXYTUNNEL', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTPPROXYTUNNEL /* Define to 1 if you have the declaration of `CURLOPT_HTTP_CONTENT_DECODING', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTP_CONTENT_DECODING /* Define to 1 if you have the declaration of `CURLOPT_HTTP_TRANSFER_DECODING', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTP_TRANSFER_DECODING /* Define to 1 if you have the declaration of `CURLOPT_HTTP_VERSION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_HTTP_VERSION /* Define to 1 if you have the declaration of `CURLOPT_IGNORE_CONTENT_LENGTH', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_IGNORE_CONTENT_LENGTH /* Define to 1 if you have the declaration of `CURLOPT_INFILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_INFILE /* Define to 1 if you have the declaration of `CURLOPT_INFILESIZE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_INFILESIZE /* Define to 1 if you have the declaration of `CURLOPT_INFILESIZE_LARGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_INFILESIZE_LARGE /* Define to 1 if you have the declaration of `CURLOPT_INTERFACE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_INTERFACE /* Define to 1 if you have the declaration of `CURLOPT_IOCTLFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_IOCTLFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_IPRESOLVE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_IPRESOLVE /* Define to 1 if you have the declaration of `CURLOPT_KRB4LEVEL', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_KRB4LEVEL /* Define to 1 if you have the declaration of `CURLOPT_LOCALPORT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_LOCALPORT /* Define to 1 if you have the declaration of `CURLOPT_LOCALPORTRANGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_LOCALPORTRANGE /* Define to 1 if you have the declaration of `CURLOPT_LOGIN_OPTIONS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_LOGIN_OPTIONS /* Define to 1 if you have the declaration of `CURLOPT_LOW_SPEED_LIMIT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_LOW_SPEED_LIMIT /* Define to 1 if you have the declaration of `CURLOPT_LOW_SPEED_TIME', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_LOW_SPEED_TIME /* Define to 1 if you have the declaration of `CURLOPT_MAIL_FROM', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAIL_FROM /* Define to 1 if you have the declaration of `CURLOPT_MAIL_RCPT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAIL_RCPT /* Define to 1 if you have the declaration of `CURLOPT_MAXCONNECTS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAXCONNECTS /* Define to 1 if you have the declaration of `CURLOPT_MAXFILESIZE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAXFILESIZE /* Define to 1 if you have the declaration of `CURLOPT_MAXFILESIZE_LARGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAXFILESIZE_LARGE /* Define to 1 if you have the declaration of `CURLOPT_MAXREDIRS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAXREDIRS /* Define to 1 if you have the declaration of `CURLOPT_MAX_RECV_SPEED_LARGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAX_RECV_SPEED_LARGE /* Define to 1 if you have the declaration of `CURLOPT_MAX_SEND_SPEED_LARGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MAX_SEND_SPEED_LARGE /* Define to 1 if you have the declaration of `CURLOPT_MIMEPOST', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_MIMEPOST /* Define to 1 if you have the declaration of `CURLOPT_NETRC', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_NETRC /* Define to 1 if you have the declaration of `CURLOPT_NETRC_FILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_NETRC_FILE /* Define to 1 if you have the declaration of `CURLOPT_NEW_DIRECTORY_PERMS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_NEW_DIRECTORY_PERMS /* Define to 1 if you have the declaration of `CURLOPT_NEW_FILE_PERMS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_NEW_FILE_PERMS /* Define to 1 if you have the declaration of `CURLOPT_NOBODY', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_NOBODY /* Define to 1 if you have the declaration of `CURLOPT_NOPROGRESS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_NOPROGRESS /* Define to 1 if you have the declaration of `CURLOPT_NOSIGNAL', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_NOSIGNAL /* Define to 1 if you have the declaration of `CURLOPT_OPENSOCKETFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_OPENSOCKETFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_PASSWORD', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PASSWORD /* Define to 1 if you have the declaration of `CURLOPT_PIPEWAIT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PIPEWAIT /* Define to 1 if you have the declaration of `CURLOPT_PORT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PORT /* Define to 1 if you have the declaration of `CURLOPT_POST', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_POST /* Define to 1 if you have the declaration of `CURLOPT_POST301', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_POST301 /* Define to 1 if you have the declaration of `CURLOPT_POSTFIELDS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_POSTFIELDS /* Define to 1 if you have the declaration of `CURLOPT_POSTFIELDSIZE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_POSTFIELDSIZE /* Define to 1 if you have the declaration of `CURLOPT_POSTFIELDSIZE_LARGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_POSTFIELDSIZE_LARGE /* Define to 1 if you have the declaration of `CURLOPT_POSTQUOTE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_POSTQUOTE /* Define to 1 if you have the declaration of `CURLOPT_POSTREDIR', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_POSTREDIR /* Define to 1 if you have the declaration of `CURLOPT_PREQUOTE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PREQUOTE /* Define to 1 if you have the declaration of `CURLOPT_PROGRESSDATA', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROGRESSDATA /* Define to 1 if you have the declaration of `CURLOPT_PROGRESSFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROGRESSFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_PROTOCOLS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROTOCOLS /* Define to 1 if you have the declaration of `CURLOPT_PROXY', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROXY /* Define to 1 if you have the declaration of `CURLOPT_PROXYAUTH', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROXYAUTH /* Define to 1 if you have the declaration of `CURLOPT_PROXYPORT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROXYPORT /* Define to 1 if you have the declaration of `CURLOPT_PROXYTYPE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROXYTYPE /* Define to 1 if you have the declaration of `CURLOPT_PROXYUSERPWD', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROXYUSERPWD /* Define to 1 if you have the declaration of `CURLOPT_PROXY_TRANSFER_MODE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PROXY_TRANSFER_MODE /* Define to 1 if you have the declaration of `CURLOPT_PUT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_PUT /* Define to 1 if you have the declaration of `CURLOPT_QUOTE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_QUOTE /* Define to 1 if you have the declaration of `CURLOPT_RANDOM_FILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_RANDOM_FILE /* Define to 1 if you have the declaration of `CURLOPT_RANGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_RANGE /* Define to 1 if you have the declaration of `CURLOPT_READFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_READFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_REDIR_PROTOCOLS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_REDIR_PROTOCOLS /* Define to 1 if you have the declaration of `CURLOPT_REFERER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_REFERER /* Define to 1 if you have the declaration of `CURLOPT_RESOLVE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_RESOLVE /* Define to 1 if you have the declaration of `CURLOPT_RESUME_FROM', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_RESUME_FROM /* Define to 1 if you have the declaration of `CURLOPT_RESUME_FROM_LARGE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_RESUME_FROM_LARGE /* Define to 1 if you have the declaration of `CURLOPT_SEEKFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SEEKFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_SHARE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SHARE /* Define to 1 if you have the declaration of `CURLOPT_SSH_AUTH_TYPES', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSH_AUTH_TYPES /* Define to 1 if you have the declaration of `CURLOPT_SSH_HOST_PUBLIC_KEY_MD5', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 /* Define to 1 if you have the declaration of `CURLOPT_SSH_PRIVATE_KEYFILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSH_PRIVATE_KEYFILE /* Define to 1 if you have the declaration of `CURLOPT_SSH_PUBLIC_KEYFILE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSH_PUBLIC_KEYFILE /* Define to 1 if you have the declaration of `CURLOPT_SSLCERT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLCERT /* Define to 1 if you have the declaration of `CURLOPT_SSLCERTPASSWD', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLCERTPASSWD /* Define to 1 if you have the declaration of `CURLOPT_SSLCERTTYPE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLCERTTYPE /* Define to 1 if you have the declaration of `CURLOPT_SSLENGINE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLENGINE /* Define to 1 if you have the declaration of `CURLOPT_SSLENGINE_DEFAULT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLENGINE_DEFAULT /* Define to 1 if you have the declaration of `CURLOPT_SSLKEY', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLKEY /* Define to 1 if you have the declaration of `CURLOPT_SSLKEYPASSWD', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLKEYPASSWD /* Define to 1 if you have the declaration of `CURLOPT_SSLKEYTYPE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLKEYTYPE /* Define to 1 if you have the declaration of `CURLOPT_SSLVERSION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSLVERSION /* Define to 1 if you have the declaration of `CURLOPT_SSL_CIPHER_LIST', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSL_CIPHER_LIST /* Define to 1 if you have the declaration of `CURLOPT_SSL_SESSIONID_CACHE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSL_SESSIONID_CACHE /* Define to 1 if you have the declaration of `CURLOPT_SSL_VERIFYHOST', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSL_VERIFYHOST /* Define to 1 if you have the declaration of `CURLOPT_SSL_VERIFYPEER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_SSL_VERIFYPEER /* Define to 1 if you have the declaration of `CURLOPT_TCP_NODELAY', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_TCP_NODELAY /* Define to 1 if you have the declaration of `CURLOPT_TELNETOPTIONS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_TELNETOPTIONS /* Define to 1 if you have the declaration of `CURLOPT_TIMECONDITION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_TIMECONDITION /* Define to 1 if you have the declaration of `CURLOPT_TIMEOUT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_TIMEOUT /* Define to 1 if you have the declaration of `CURLOPT_TIMEOUT_MS', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_TIMEOUT_MS /* Define to 1 if you have the declaration of `CURLOPT_TIMEVALUE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_TIMEVALUE /* Define to 1 if you have the declaration of `CURLOPT_TRANSFERTEXT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_TRANSFERTEXT /* Define to 1 if you have the declaration of `CURLOPT_UNRESTRICTED_AUTH', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_UNRESTRICTED_AUTH /* Define to 1 if you have the declaration of `CURLOPT_UPLOAD', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_UPLOAD /* Define to 1 if you have the declaration of `CURLOPT_URL', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_URL /* Define to 1 if you have the declaration of `CURLOPT_USERAGENT', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_USERAGENT /* Define to 1 if you have the declaration of `CURLOPT_USERNAME', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_USERNAME /* Define to 1 if you have the declaration of `CURLOPT_USERPWD', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_USERPWD /* Define to 1 if you have the declaration of `CURLOPT_VERBOSE', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_VERBOSE /* Define to 1 if you have the declaration of `CURLOPT_WRITEFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_WRITEFUNCTION /* Define to 1 if you have the declaration of `CURLOPT_WRITEHEADER', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_WRITEHEADER /* Define to 1 if you have the declaration of `CURLOPT_WRITEINFO', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_WRITEINFO /* Define to 1 if you have the declaration of `CURL_HTTP_VERSION_2', and to 0 if you don't. */ #undef HAVE_DECL_CURL_HTTP_VERSION_2 /* Define to 1 if you have the declaration of `CURL_HTTP_VERSION_2TLS', and to 0 if you don't. */ #undef HAVE_DECL_CURL_HTTP_VERSION_2TLS /* Define to 1 if you have the declaration of `CURL_HTTP_VERSION_2_0', and to 0 if you don't. */ #undef HAVE_DECL_CURL_HTTP_VERSION_2_0 /* Define to 1 if you have the declaration of `CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE', and to 0 if you don't. */ #undef HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE /* Define to 1 if you have the declaration of `CURL_SSLVERSION_TLSv1_0', and to 0 if you don't. */ #undef HAVE_DECL_CURL_SSLVERSION_TLSV1_0 /* Define to 1 if you have the declaration of `CURL_SSLVERSION_TLSv1_1', and to 0 if you don't. */ #undef HAVE_DECL_CURL_SSLVERSION_TLSV1_1 /* Define to 1 if you have the declaration of `CURL_SSLVERSION_TLSv1_2', and to 0 if you don't. */ #undef HAVE_DECL_CURL_SSLVERSION_TLSV1_2 /* Define to 1 if you have the declaration of `CURL_SSLVERSION_TLSv1_3', and to 0 if you don't. */ #undef HAVE_DECL_CURL_SSLVERSION_TLSV1_3 /* Define to 1 if you have the declaration of `CURL_VERSION_NTLM_WB', and to 0 if you don't. */ #undef HAVE_DECL_CURL_VERSION_NTLM_WB /* Define to 1 if you have the declaration of `CURL_VERSION_TLSAUTH_SRP', and to 0 if you don't. */ #undef HAVE_DECL_CURL_VERSION_TLSAUTH_SRP /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS ocurl-0.9.0/config.h.windows000066400000000000000000001070371356304035200157640ustar00rootroot00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the declaration of `CURLE_ABORTED_BY_CALLBACK', and to 0 if you don't. */ #define HAVE_DECL_CURLE_ABORTED_BY_CALLBACK 1 /* Define to 1 if you have the declaration of `CURLE_AGAIN', and to 0 if you don't. */ #define HAVE_DECL_CURLE_AGAIN 1 /* Define to 1 if you have the declaration of `CURLE_BAD_CALLING_ORDER', and to 0 if you don't. */ #define HAVE_DECL_CURLE_BAD_CALLING_ORDER 1 /* Define to 1 if you have the declaration of `CURLE_BAD_CONTENT_ENCODING', and to 0 if you don't. */ #define HAVE_DECL_CURLE_BAD_CONTENT_ENCODING 1 /* Define to 1 if you have the declaration of `CURLE_BAD_DOWNLOAD_RESUME', and to 0 if you don't. */ #define HAVE_DECL_CURLE_BAD_DOWNLOAD_RESUME 1 /* Define to 1 if you have the declaration of `CURLE_BAD_FUNCTION_ARGUMENT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_BAD_FUNCTION_ARGUMENT 1 /* Define to 1 if you have the declaration of `CURLE_BAD_PASSWORD_ENTERED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_BAD_PASSWORD_ENTERED 1 /* Define to 1 if you have the declaration of `CURLE_CONV_FAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_CONV_FAILED 1 /* Define to 1 if you have the declaration of `CURLE_CONV_REQD', and to 0 if you don't. */ #define HAVE_DECL_CURLE_CONV_REQD 1 /* Define to 1 if you have the declaration of `CURLE_COULDNT_CONNECT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_COULDNT_CONNECT 1 /* Define to 1 if you have the declaration of `CURLE_COULDNT_RESOLVE_HOST', and to 0 if you don't. */ #define HAVE_DECL_CURLE_COULDNT_RESOLVE_HOST 1 /* Define to 1 if you have the declaration of `CURLE_COULDNT_RESOLVE_PROXY', and to 0 if you don't. */ #define HAVE_DECL_CURLE_COULDNT_RESOLVE_PROXY 1 /* Define to 1 if you have the declaration of `CURLE_FAILED_INIT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FAILED_INIT 1 /* Define to 1 if you have the declaration of `CURLE_FILESIZE_EXCEEDED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FILESIZE_EXCEEDED 1 /* Define to 1 if you have the declaration of `CURLE_FILE_COULDNT_READ_FILE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FILE_COULDNT_READ_FILE 1 /* Define to 1 if you have the declaration of `CURLE_FTP_ACCESS_DENIED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_ACCESS_DENIED 1 /* Define to 1 if you have the declaration of `CURLE_FTP_CANT_GET_HOST', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_CANT_GET_HOST 1 /* Define to 1 if you have the declaration of `CURLE_FTP_CANT_RECONNECT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_CANT_RECONNECT 1 /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_GET_SIZE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_COULDNT_GET_SIZE 1 /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_RETR_FILE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_COULDNT_RETR_FILE 1 /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_SET_ASCII', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_COULDNT_SET_ASCII 1 /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_SET_BINARY', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_COULDNT_SET_BINARY 1 /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_STOR_FILE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_COULDNT_STOR_FILE 1 /* Define to 1 if you have the declaration of `CURLE_FTP_COULDNT_USE_REST', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_COULDNT_USE_REST 1 /* Define to 1 if you have the declaration of `CURLE_FTP_PORT_FAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_PORT_FAILED 1 /* Define to 1 if you have the declaration of `CURLE_FTP_QUOTE_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_QUOTE_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_FTP_SSL_FAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_SSL_FAILED 1 /* Define to 1 if you have the declaration of `CURLE_FTP_USER_PASSWORD_INCORRECT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_USER_PASSWORD_INCORRECT 1 /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_227_FORMAT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_WEIRD_227_FORMAT 1 /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_PASS_REPLY', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_WEIRD_PASS_REPLY 1 /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_PASV_REPLY', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_WEIRD_PASV_REPLY 1 /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_SERVER_REPLY', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_WEIRD_SERVER_REPLY 1 /* Define to 1 if you have the declaration of `CURLE_FTP_WEIRD_USER_REPLY', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_WEIRD_USER_REPLY 1 /* Define to 1 if you have the declaration of `CURLE_FTP_WRITE_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FTP_WRITE_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_FUNCTION_NOT_FOUND', and to 0 if you don't. */ #define HAVE_DECL_CURLE_FUNCTION_NOT_FOUND 1 /* Define to 1 if you have the declaration of `CURLE_GOT_NOTHING', and to 0 if you don't. */ #define HAVE_DECL_CURLE_GOT_NOTHING 1 /* Define to 1 if you have the declaration of `CURLE_HTTP_POST_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_HTTP_POST_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_HTTP_RANGE_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_HTTP_RANGE_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_HTTP_RETURNED_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_HTTP_RETURNED_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_INTERFACE_FAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_INTERFACE_FAILED 1 /* Define to 1 if you have the declaration of `CURLE_LDAP_CANNOT_BIND', and to 0 if you don't. */ #define HAVE_DECL_CURLE_LDAP_CANNOT_BIND 1 /* Define to 1 if you have the declaration of `CURLE_LDAP_INVALID_URL', and to 0 if you don't. */ #define HAVE_DECL_CURLE_LDAP_INVALID_URL 1 /* Define to 1 if you have the declaration of `CURLE_LDAP_SEARCH_FAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_LDAP_SEARCH_FAILED 1 /* Define to 1 if you have the declaration of `CURLE_LIBRARY_NOT_FOUND', and to 0 if you don't. */ #define HAVE_DECL_CURLE_LIBRARY_NOT_FOUND 1 /* Define to 1 if you have the declaration of `CURLE_LOGIN_DENIED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_LOGIN_DENIED 1 /* Define to 1 if you have the declaration of `CURLE_MALFORMAT_USER', and to 0 if you don't. */ #define HAVE_DECL_CURLE_MALFORMAT_USER 1 /* Define to 1 if you have the declaration of `CURLE_OPERATION_TIMEOUTED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_OPERATION_TIMEOUTED 1 /* Define to 1 if you have the declaration of `CURLE_OUT_OF_MEMORY', and to 0 if you don't. */ #define HAVE_DECL_CURLE_OUT_OF_MEMORY 1 /* Define to 1 if you have the declaration of `CURLE_PARTIAL_FILE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_PARTIAL_FILE 1 /* Define to 1 if you have the declaration of `CURLE_READ_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_READ_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_RECV_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_RECV_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_REMOTE_DISK_FULL', and to 0 if you don't. */ #define HAVE_DECL_CURLE_REMOTE_DISK_FULL 1 /* Define to 1 if you have the declaration of `CURLE_REMOTE_FILE_EXISTS', and to 0 if you don't. */ #define HAVE_DECL_CURLE_REMOTE_FILE_EXISTS 1 /* Define to 1 if you have the declaration of `CURLE_REMOTE_FILE_NOT_FOUND', and to 0 if you don't. */ #define HAVE_DECL_CURLE_REMOTE_FILE_NOT_FOUND 1 /* Define to 1 if you have the declaration of `CURLE_SEND_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SEND_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_SEND_FAIL_REWIND', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SEND_FAIL_REWIND 1 /* Define to 1 if you have the declaration of `CURLE_SHARE_IN_USE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SHARE_IN_USE 1 /* Define to 1 if you have the declaration of `CURLE_SSH', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSH 1 /* Define to 1 if you have the declaration of `CURLE_SSL_CACERT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_CACERT 1 /* Define to 1 if you have the declaration of `CURLE_SSL_CACERT_BADFILE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_CACERT_BADFILE 1 /* Define to 1 if you have the declaration of `CURLE_SSL_CERTPROBLEM', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_CERTPROBLEM 1 /* Define to 1 if you have the declaration of `CURLE_SSL_CIPHER', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_CIPHER 1 /* Define to 1 if you have the declaration of `CURLE_SSL_CONNECT_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_CONNECT_ERROR 1 /* Define to 1 if you have the declaration of `CURLE_SSL_ENGINE_INITFAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_ENGINE_INITFAILED 1 /* Define to 1 if you have the declaration of `CURLE_SSL_ENGINE_NOTFOUND', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_ENGINE_NOTFOUND 1 /* Define to 1 if you have the declaration of `CURLE_SSL_ENGINE_SETFAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_ENGINE_SETFAILED 1 /* Define to 1 if you have the declaration of `CURLE_SSL_PEER_CERTIFICATE', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_PEER_CERTIFICATE 1 /* Define to 1 if you have the declaration of `CURLE_SSL_SHUTDOWN_FAILED', and to 0 if you don't. */ #define HAVE_DECL_CURLE_SSL_SHUTDOWN_FAILED 1 /* Define to 1 if you have the declaration of `CURLE_TELNET_OPTION_SYNTAX', and to 0 if you don't. */ #define HAVE_DECL_CURLE_TELNET_OPTION_SYNTAX 1 /* Define to 1 if you have the declaration of `CURLE_TFTP_ILLEGAL', and to 0 if you don't. */ #define HAVE_DECL_CURLE_TFTP_ILLEGAL 1 /* Define to 1 if you have the declaration of `CURLE_TFTP_NOSUCHUSER', and to 0 if you don't. */ #define HAVE_DECL_CURLE_TFTP_NOSUCHUSER 1 /* Define to 1 if you have the declaration of `CURLE_TFTP_NOTFOUND', and to 0 if you don't. */ #define HAVE_DECL_CURLE_TFTP_NOTFOUND 1 /* Define to 1 if you have the declaration of `CURLE_TFTP_PERM', and to 0 if you don't. */ #define HAVE_DECL_CURLE_TFTP_PERM 1 /* Define to 1 if you have the declaration of `CURLE_TFTP_UNKNOWNID', and to 0 if you don't. */ #define HAVE_DECL_CURLE_TFTP_UNKNOWNID 1 /* Define to 1 if you have the declaration of `CURLE_TOO_MANY_REDIRECTS', and to 0 if you don't. */ #define HAVE_DECL_CURLE_TOO_MANY_REDIRECTS 1 /* Define to 1 if you have the declaration of `CURLE_UNKNOWN_TELNET_OPTION', and to 0 if you don't. */ #define HAVE_DECL_CURLE_UNKNOWN_TELNET_OPTION 1 /* Define to 1 if you have the declaration of `CURLE_UNSUPPORTED_PROTOCOL', and to 0 if you don't. */ #define HAVE_DECL_CURLE_UNSUPPORTED_PROTOCOL 1 /* Define to 1 if you have the declaration of `CURLE_URL_MALFORMAT', and to 0 if you don't. */ #define HAVE_DECL_CURLE_URL_MALFORMAT 1 /* Define to 1 if you have the declaration of `CURLE_URL_MALFORMAT_USER', and to 0 if you don't. */ #define HAVE_DECL_CURLE_URL_MALFORMAT_USER 1 /* Define to 1 if you have the declaration of `CURLE_WRITE_ERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLE_WRITE_ERROR 1 /* Define to 1 if you have the declaration of `CURLINFO_CONNECT_TIME', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_CONNECT_TIME 1 /* Define to 1 if you have the declaration of `CURLINFO_CONTENT_LENGTH_DOWNLOAD', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_CONTENT_LENGTH_DOWNLOAD 1 /* Define to 1 if you have the declaration of `CURLINFO_CONTENT_LENGTH_UPLOAD', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_CONTENT_LENGTH_UPLOAD 1 /* Define to 1 if you have the declaration of `CURLINFO_CONTENT_TYPE', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_CONTENT_TYPE 1 /* Define to 1 if you have the declaration of `CURLINFO_COOKIELIST', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_COOKIELIST 1 /* Define to 1 if you have the declaration of `CURLINFO_EFFECTIVE_URL', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_EFFECTIVE_URL 1 /* Define to 1 if you have the declaration of `CURLINFO_FILETIME', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_FILETIME 1 /* Define to 1 if you have the declaration of `CURLINFO_FTP_ENTRY_PATH', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_FTP_ENTRY_PATH 1 /* Define to 1 if you have the declaration of `CURLINFO_REDIRECT_URL', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_REDIRECT_URL 1 /* Define to 1 if you have the declaration of `CURLINFO_HEADER_SIZE', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_HEADER_SIZE 1 /* Define to 1 if you have the declaration of `CURLINFO_HTTPAUTH_AVAIL', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_HTTPAUTH_AVAIL 1 /* Define to 1 if you have the declaration of `CURLINFO_HTTP_CONNECTCODE', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_HTTP_CONNECTCODE 1 /* Define to 1 if you have the declaration of `CURLINFO_LASTSOCKET', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_LASTSOCKET 1 /* Define to 1 if you have the declaration of `CURLINFO_NAMELOOKUP_TIME', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_NAMELOOKUP_TIME 1 /* Define to 1 if you have the declaration of `CURLINFO_NUM_CONNECTS', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_NUM_CONNECTS 1 /* Define to 1 if you have the declaration of `CURLINFO_OS_ERRNO', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_OS_ERRNO 1 /* Define to 1 if you have the declaration of `CURLINFO_PRETRANSFER_TIME', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_PRETRANSFER_TIME 1 /* Define to 1 if you have the declaration of `CURLINFO_PRIVATE', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_PRIVATE 1 /* Define to 1 if you have the declaration of `CURLINFO_PROXYAUTH_AVAIL', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_PROXYAUTH_AVAIL 1 /* Define to 1 if you have the declaration of `CURLINFO_REDIRECT_COUNT', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_REDIRECT_COUNT 1 /* Define to 1 if you have the declaration of `CURLINFO_REDIRECT_TIME', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_REDIRECT_TIME 1 /* Define to 1 if you have the declaration of `CURLINFO_REQUEST_SIZE', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_REQUEST_SIZE 1 /* Define to 1 if you have the declaration of `CURLINFO_RESPONSE_CODE', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_RESPONSE_CODE 1 /* Define to 1 if you have the declaration of `CURLINFO_SIZE_DOWNLOAD', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_SIZE_DOWNLOAD 1 /* Define to 1 if you have the declaration of `CURLINFO_SIZE_UPLOAD', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_SIZE_UPLOAD 1 /* Define to 1 if you have the declaration of `CURLINFO_SPEED_DOWNLOAD', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_SPEED_DOWNLOAD 1 /* Define to 1 if you have the declaration of `CURLINFO_SPEED_UPLOAD', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_SPEED_UPLOAD 1 /* Define to 1 if you have the declaration of `CURLINFO_SSL_ENGINES', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_SSL_ENGINES 1 /* Define to 1 if you have the declaration of `CURLINFO_SSL_VERIFYRESULT', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_SSL_VERIFYRESULT 1 /* Define to 1 if you have the declaration of `CURLINFO_STARTTRANSFER_TIME', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_STARTTRANSFER_TIME 1 /* Define to 1 if you have the declaration of `CURLINFO_TOTAL_TIME', and to 0 if you don't. */ #define HAVE_DECL_CURLINFO_TOTAL_TIME 1 /* Define to 1 if you have the declaration of `CURLOPT_AUTOREFERER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_AUTOREFERER 1 /* Define to 1 if you have the declaration of `CURLOPT_BUFFERSIZE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_BUFFERSIZE 1 /* Define to 1 if you have the declaration of `CURLOPT_CAINFO', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CAINFO 1 /* Define to 1 if you have the declaration of `CURLOPT_CAPATH', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CAPATH 1 /* Define to 1 if you have the declaration of `CURLOPT_CLOSEPOLICY', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CLOSEPOLICY 1 /* Define to 1 if you have the declaration of `CURLOPT_CONNECTTIMEOUT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CONNECTTIMEOUT 1 /* Define to 1 if you have the declaration of `CURLOPT_CONNECTTIMEOUT_MS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CONNECTTIMEOUT_MS 1 /* Define to 1 if you have the declaration of `CURLOPT_CONNECT_ONLY', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CONNECT_ONLY 1 /* Define to 1 if you have the declaration of `CURLOPT_COOKIE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_COOKIE 1 /* Define to 1 if you have the declaration of `CURLOPT_COOKIEFILE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_COOKIEFILE 1 /* Define to 1 if you have the declaration of `CURLOPT_COOKIEJAR', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_COOKIEJAR 1 /* Define to 1 if you have the declaration of `CURLOPT_COOKIELIST', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_COOKIELIST 1 /* Define to 1 if you have the declaration of `CURLOPT_COOKIESESSION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_COOKIESESSION 1 /* Define to 1 if you have the declaration of `CURLOPT_COPYPOSTFIELDS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_COPYPOSTFIELDS 1 /* Define to 1 if you have the declaration of `CURLOPT_CRLF', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CRLF 1 /* Define to 1 if you have the declaration of `CURLOPT_CUSTOMREQUEST', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_CUSTOMREQUEST 1 /* Define to 1 if you have the declaration of `CURLOPT_DEBUGDATA', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_DEBUGDATA 1 /* Define to 1 if you have the declaration of `CURLOPT_DEBUGFUNCTION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_DEBUGFUNCTION 1 /* Define to 1 if you have the declaration of `CURLOPT_DNS_CACHE_TIMEOUT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_DNS_CACHE_TIMEOUT 1 /* Define to 1 if you have the declaration of `CURLOPT_DNS_USE_GLOBAL_CACHE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_DNS_USE_GLOBAL_CACHE 1 /* Define to 1 if you have the declaration of `CURLOPT_EGDSOCKET', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_EGDSOCKET 1 /* Define to 1 if you have the declaration of `CURLOPT_ENCODING', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_ENCODING 1 /* Define to 1 if you have the declaration of `CURLOPT_ERRORBUFFER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_ERRORBUFFER 1 /* Define to 1 if you have the declaration of `CURLOPT_FAILONERROR', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FAILONERROR 1 /* Define to 1 if you have the declaration of `CURLOPT_FILE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FILE 1 /* Define to 1 if you have the declaration of `CURLOPT_FILETIME', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FILETIME 1 /* Define to 1 if you have the declaration of `CURLOPT_FOLLOWLOCATION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FOLLOWLOCATION 1 /* Define to 1 if you have the declaration of `CURLOPT_FORBID_REUSE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FORBID_REUSE 1 /* Define to 1 if you have the declaration of `CURLOPT_FRESH_CONNECT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FRESH_CONNECT 1 /* Define to 1 if you have the declaration of `CURLOPT_FTPAPPEND', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTPAPPEND 1 /* Define to 1 if you have the declaration of `CURLOPT_FTPLISTONLY', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTPLISTONLY 1 /* Define to 1 if you have the declaration of `CURLOPT_FTPPORT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTPPORT 1 /* Define to 1 if you have the declaration of `CURLOPT_FTPSSLAUTH', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTPSSLAUTH 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_ACCOUNT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_ACCOUNT 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_ALTERNATIVE_TO_USER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_ALTERNATIVE_TO_USER 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_CREATE_MISSING_DIRS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_CREATE_MISSING_DIRS 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_FILEMETHOD', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_FILEMETHOD 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_RESPONSE_TIMEOUT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_RESPONSE_TIMEOUT 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_SKIP_PASV_IP', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_SKIP_PASV_IP 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_SSL', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_SSL 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_SSL_CCC', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_SSL_CCC 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_USE_EPRT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_USE_EPRT 1 /* Define to 1 if you have the declaration of `CURLOPT_FTP_USE_EPSV', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_FTP_USE_EPSV 1 /* Define to 1 if you have the declaration of `CURLOPT_HEADER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HEADER 1 /* Define to 1 if you have the declaration of `CURLOPT_HEADERFUNCTION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HEADERFUNCTION 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTP200ALIASES', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTP200ALIASES 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTPAUTH', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTPAUTH 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTPGET', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTPGET 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTPHEADER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTPHEADER 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTPPOST', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTPPOST 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTPPROXYTUNNEL', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTPPROXYTUNNEL 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTP_CONTENT_DECODING', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTP_CONTENT_DECODING 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTP_TRANSFER_DECODING', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTP_TRANSFER_DECODING 1 /* Define to 1 if you have the declaration of `CURLOPT_HTTP_VERSION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_HTTP_VERSION 1 /* Define to 1 if you have the declaration of `CURLOPT_IGNORE_CONTENT_LENGTH', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_IGNORE_CONTENT_LENGTH 1 /* Define to 1 if you have the declaration of `CURLOPT_INFILE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_INFILE 1 /* Define to 1 if you have the declaration of `CURLOPT_INFILESIZE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_INFILESIZE 1 /* Define to 1 if you have the declaration of `CURLOPT_INFILESIZE_LARGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_INFILESIZE_LARGE 1 /* Define to 1 if you have the declaration of `CURLOPT_INTERFACE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_INTERFACE 1 /* Define to 1 if you have the declaration of `CURLOPT_IOCTLFUNCTION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_IOCTLFUNCTION 1 /* Define to 1 if you have the declaration of `CURLOPT_IPRESOLVE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_IPRESOLVE 1 /* Define to 1 if you have the declaration of `CURLOPT_KRB4LEVEL', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_KRB4LEVEL 1 /* Define to 1 if you have the declaration of `CURLOPT_LOCALPORT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_LOCALPORT 1 /* Define to 1 if you have the declaration of `CURLOPT_LOCALPORTRANGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_LOCALPORTRANGE 1 /* Define to 1 if you have the declaration of `CURLOPT_LOW_SPEED_LIMIT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_LOW_SPEED_LIMIT 1 /* Define to 1 if you have the declaration of `CURLOPT_LOW_SPEED_TIME', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_LOW_SPEED_TIME 1 /* Define to 1 if you have the declaration of `CURLOPT_MAXCONNECTS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_MAXCONNECTS 1 /* Define to 1 if you have the declaration of `CURLOPT_MAXFILESIZE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_MAXFILESIZE 1 /* Define to 1 if you have the declaration of `CURLOPT_MAXFILESIZE_LARGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_MAXFILESIZE_LARGE 1 /* Define to 1 if you have the declaration of `CURLOPT_MAXREDIRS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_MAXREDIRS 1 /* Define to 1 if you have the declaration of `CURLOPT_MAX_RECV_SPEED_LARGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_MAX_RECV_SPEED_LARGE 1 /* Define to 1 if you have the declaration of `CURLOPT_MAX_SEND_SPEED_LARGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_MAX_SEND_SPEED_LARGE 1 /* Define to 1 if you have the declaration of `CURLOPT_NETRC', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_NETRC 1 /* Define to 1 if you have the declaration of `CURLOPT_NETRC_FILE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_NETRC_FILE 1 /* Define to 1 if you have the declaration of `CURLOPT_NEW_DIRECTORY_PERMS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_NEW_DIRECTORY_PERMS 1 /* Define to 1 if you have the declaration of `CURLOPT_NEW_FILE_PERMS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_NEW_FILE_PERMS 1 /* Define to 1 if you have the declaration of `CURLOPT_NOBODY', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_NOBODY 1 /* Define to 1 if you have the declaration of `CURLOPT_NOPROGRESS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_NOPROGRESS 1 /* Define to 1 if you have the declaration of `CURLOPT_NOSIGNAL', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_NOSIGNAL 1 /* Define to 1 if you have the declaration of `CURLOPT_PORT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PORT 1 /* Define to 1 if you have the declaration of `CURLOPT_POST', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_POST 1 /* Define to 1 if you have the declaration of `CURLOPT_POST301', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_POST301 1 /* Define to 1 if you have the declaration of `CURLOPT_POSTFIELDS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_POSTFIELDS 1 /* Define to 1 if you have the declaration of `CURLOPT_POSTFIELDSIZE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_POSTFIELDSIZE 1 /* Define to 1 if you have the declaration of `CURLOPT_POSTFIELDSIZE_LARGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_POSTFIELDSIZE_LARGE 1 /* Define to 1 if you have the declaration of `CURLOPT_POSTQUOTE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_POSTQUOTE 1 /* Define to 1 if you have the declaration of `CURLOPT_PREQUOTE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PREQUOTE 1 /* Define to 1 if you have the declaration of `CURLOPT_PRIVATE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PRIVATE 1 /* Define to 1 if you have the declaration of `CURLOPT_PROGRESSDATA', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROGRESSDATA 1 /* Define to 1 if you have the declaration of `CURLOPT_PROGRESSFUNCTION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROGRESSFUNCTION 1 /* Define to 1 if you have the declaration of `CURLOPT_PROXY', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROXY 1 /* Define to 1 if you have the declaration of `CURLOPT_PROXYAUTH', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROXYAUTH 1 /* Define to 1 if you have the declaration of `CURLOPT_PROXYPORT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROXYPORT 1 /* Define to 1 if you have the declaration of `CURLOPT_PROXYTYPE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROXYTYPE 1 /* Define to 1 if you have the declaration of `CURLOPT_PROXYUSERPWD', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROXYUSERPWD 1 /* Define to 1 if you have the declaration of `CURLOPT_PROXY_TRANSFER_MODE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PROXY_TRANSFER_MODE 1 /* Define to 1 if you have the declaration of `CURLOPT_PUT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_PUT 1 /* Define to 1 if you have the declaration of `CURLOPT_QUOTE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_QUOTE 1 /* Define to 1 if you have the declaration of `CURLOPT_RANDOM_FILE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_RANDOM_FILE 1 /* Define to 1 if you have the declaration of `CURLOPT_RANGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_RANGE 1 /* Define to 1 if you have the declaration of `CURLOPT_READFUNCTION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_READFUNCTION 1 /* Define to 1 if you have the declaration of `CURLOPT_REFERER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_REFERER 1 /* Define to 1 if you have the declaration of `CURLOPT_RESUME_FROM', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_RESUME_FROM 1 /* Define to 1 if you have the declaration of `CURLOPT_RESUME_FROM_LARGE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_RESUME_FROM_LARGE 1 /* Define to 1 if you have the declaration of `CURLOPT_SEEKFUNCTION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SEEKFUNCTION 1 /* Define to 1 if you have the declaration of `CURLOPT_SHARE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SHARE 1 /* Define to 1 if you have the declaration of `CURLOPT_SSH_AUTH_TYPES', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSH_AUTH_TYPES 1 /* Define to 1 if you have the declaration of `CURLOPT_SSH_HOST_PUBLIC_KEY_MD5', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 1 /* Define to 1 if you have the declaration of `CURLOPT_SSH_PRIVATE_KEYFILE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSH_PRIVATE_KEYFILE 1 /* Define to 1 if you have the declaration of `CURLOPT_SSH_PUBLIC_KEYFILE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSH_PUBLIC_KEYFILE 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLCERT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLCERT 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLCERTPASSWD', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLCERTPASSWD 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLCERTTYPE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLCERTTYPE 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLENGINE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLENGINE 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLENGINE_DEFAULT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLENGINE_DEFAULT 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLKEY', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLKEY 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLKEYPASSWD', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLKEYPASSWD 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLKEYTYPE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLKEYTYPE 1 /* Define to 1 if you have the declaration of `CURLOPT_SSLVERSION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSLVERSION 1 /* Define to 1 if you have the declaration of `CURLOPT_SSL_CIPHER_LIST', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSL_CIPHER_LIST 1 /* Define to 1 if you have the declaration of `CURLOPT_SSL_SESSIONID_CACHE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSL_SESSIONID_CACHE 1 /* Define to 1 if you have the declaration of `CURLOPT_SSL_VERIFYHOST', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSL_VERIFYHOST 1 /* Define to 1 if you have the declaration of `CURLOPT_SSL_VERIFYPEER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_SSL_VERIFYPEER 1 /* Define to 1 if you have the declaration of `CURLOPT_STDERR', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_STDERR 1 /* Define to 1 if you have the declaration of `CURLOPT_TCP_NODELAY', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_TCP_NODELAY 1 /* Define to 1 if you have the declaration of `CURLOPT_TELNETOPTIONS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_TELNETOPTIONS 1 /* Define to 1 if you have the declaration of `CURLOPT_TIMECONDITION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_TIMECONDITION 1 /* Define to 1 if you have the declaration of `CURLOPT_TIMEOUT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_TIMEOUT 1 /* Define to 1 if you have the declaration of `CURLOPT_TIMEOUT_MS', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_TIMEOUT_MS 1 /* Define to 1 if you have the declaration of `CURLOPT_TIMEVALUE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_TIMEVALUE 1 /* Define to 1 if you have the declaration of `CURLOPT_TRANSFERTEXT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_TRANSFERTEXT 1 /* Define to 1 if you have the declaration of `CURLOPT_UNRESTRICTED_AUTH', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_UNRESTRICTED_AUTH 1 /* Define to 1 if you have the declaration of `CURLOPT_UPLOAD', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_UPLOAD 1 /* Define to 1 if you have the declaration of `CURLOPT_URL', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_URL 1 /* Define to 1 if you have the declaration of `CURLOPT_USERAGENT', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_USERAGENT 1 /* Define to 1 if you have the declaration of `CURLOPT_USERPWD', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_USERPWD 1 /* Define to 1 if you have the declaration of `CURLOPT_VERBOSE', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_VERBOSE 1 /* Define to 1 if you have the declaration of `CURLOPT_WRITEFUNCTION', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_WRITEFUNCTION 1 /* Define to 1 if you have the declaration of `CURLOPT_WRITEHEADER', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_WRITEHEADER 1 /* Define to 1 if you have the declaration of `CURLOPT_WRITEINFO', and to 0 if you don't. */ #define HAVE_DECL_CURLOPT_WRITEINFO 1 /* Define to 1 if you have the declaration of `CURLOPT_OPENSOCKETFUNCTION', and to 0 if you don't. */ #undef HAVE_DECL_CURLOPT_OPENSOCKETFUNCTION /* FIXME disabled */ /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION ocurl-0.9.0/configure000077500000000000000000010133651356304035200145650ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for ocurl 0.9.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ocurl' PACKAGE_TARNAME='ocurl' PACKAGE_VERSION='0.9.0' PACKAGE_STRING='ocurl 0.9.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS EGREP GREP CPP EXT_OBJ EXT_LIB EXT_DLL OCAML_HAS_BIN_ANNOT INSTALLDIR CURLLIBS ac_prefix_program OCAML_PKG_lwt_ppx OCAML_PKG_lwt_unix OCAML_PKG_bytes OCAMLFIND OCAMLBUILD OCAMLDOC OCAMLMKLIB OCAMLMKTOP OCAMLDEP OCAML OCAMLOPTDOTOPT OCAMLCDOTOPT OCAMLBEST OCAMLOPT OCAMLLIB OCAMLVERSION OCAMLC INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures ocurl 0.9.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/ocurl] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of ocurl 0.9.0:";; esac cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ocurl configure 0.9.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ocurl $as_me 0.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu MIN_LIBCURL_VERSION=7.28.0 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl cflags" >&5 $as_echo_n "checking for libcurl cflags... " >&6; } CURLCFLAGS=`pkg-config libcurl --cflags || curl-config --cflags` if test "$?" -eq 0 ; then : else as_fn_error $? "libcurl was not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLCFLAGS" >&5 $as_echo "$CURLCFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl libs" >&5 $as_echo_n "checking for libcurl libs... " >&6; } CURLLIBS=`pkg-config libcurl --libs || curl-config --libs` if test "$?" -eq 0 ; then : else as_fn_error $? "libcurl was not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLLIBS" >&5 $as_echo "$CURLLIBS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl version >= $MIN_LIBCURL_VERSION" >&5 $as_echo_n "checking for libcurl version >= $MIN_LIBCURL_VERSION... " >&6; } LIBCURL_VERSION=`pkg-config libcurl --modversion || curl-config --version` (pkg-config libcurl && pkg-config libcurl --atleast-version=${MIN_LIBCURL_VERSION}) || curl-config --checkfor ${MIN_LIBCURL_VERSION} if test "$?" -eq 0 ; then : else as_fn_error $? "${LIBCURL_VERSION} is too old" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBCURL_VERSION}" >&5 $as_echo "${LIBCURL_VERSION}" >&6; } ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # checking for ocamlc if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLC"; then ac_cv_prog_OCAMLC="$OCAMLC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLC=$ac_cv_prog_OCAMLC if test -n "$OCAMLC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5 $as_echo "$OCAMLC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLC"; then ac_ct_OCAMLC=$OCAMLC # Extract the first word of "ocamlc", so it can be a program name with args. set dummy ocamlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLC"; then ac_cv_prog_ac_ct_OCAMLC="$ac_ct_OCAMLC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLC="ocamlc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLC=$ac_cv_prog_ac_ct_OCAMLC if test -n "$ac_ct_OCAMLC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLC" >&5 $as_echo "$ac_ct_OCAMLC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLC" = x; then OCAMLC="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLC=$ac_ct_OCAMLC fi else OCAMLC="$ac_cv_prog_OCAMLC" fi if test "$OCAMLC" != "no"; then OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml version is $OCAMLVERSION" >&5 $as_echo "OCaml version is $OCAMLVERSION" >&6; } # If OCAMLLIB is set, use it if test "$OCAMLLIB" = ""; then OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4` else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCAMLLIB previously set; preserving it." >&5 $as_echo "OCAMLLIB previously set; preserving it." >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml library path is $OCAMLLIB" >&5 $as_echo "OCaml library path is $OCAMLLIB" >&6; } # checking for ocamlopt if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlopt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlopt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLOPT"; then ac_cv_prog_OCAMLOPT="$OCAMLOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLOPT=$ac_cv_prog_OCAMLOPT if test -n "$OCAMLOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5 $as_echo "$OCAMLOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLOPT"; then ac_ct_OCAMLOPT=$OCAMLOPT # Extract the first word of "ocamlopt", so it can be a program name with args. set dummy ocamlopt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLOPT"; then ac_cv_prog_ac_ct_OCAMLOPT="$ac_ct_OCAMLOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLOPT="ocamlopt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLOPT=$ac_cv_prog_ac_ct_OCAMLOPT if test -n "$ac_ct_OCAMLOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLOPT" >&5 $as_echo "$ac_ct_OCAMLOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLOPT" = x; then OCAMLOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLOPT=$ac_ct_OCAMLOPT fi else OCAMLOPT="$ac_cv_prog_OCAMLOPT" fi OCAMLBEST=byte if test "$OCAMLOPT" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5 $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;} else TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlopt discarded." >&5 $as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; } OCAMLOPT=no else OCAMLBEST=opt fi fi # checking for ocamlc.opt if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlc.opt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLCDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLCDOTOPT"; then ac_cv_prog_OCAMLCDOTOPT="$OCAMLCDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLCDOTOPT=$ac_cv_prog_OCAMLCDOTOPT if test -n "$OCAMLCDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLCDOTOPT" >&5 $as_echo "$OCAMLCDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLCDOTOPT"; then ac_ct_OCAMLCDOTOPT=$OCAMLCDOTOPT # Extract the first word of "ocamlc.opt", so it can be a program name with args. set dummy ocamlc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLCDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLCDOTOPT"; then ac_cv_prog_ac_ct_OCAMLCDOTOPT="$ac_ct_OCAMLCDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLCDOTOPT="ocamlc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLCDOTOPT=$ac_cv_prog_ac_ct_OCAMLCDOTOPT if test -n "$ac_ct_OCAMLCDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLCDOTOPT" >&5 $as_echo "$ac_ct_OCAMLCDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLCDOTOPT" = x; then OCAMLCDOTOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLCDOTOPT=$ac_ct_OCAMLCDOTOPT fi else OCAMLCDOTOPT="$ac_cv_prog_OCAMLCDOTOPT" fi if test "$OCAMLCDOTOPT" != "no"; then TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlc.opt discarded." >&5 $as_echo "versions differs from ocamlc; ocamlc.opt discarded." >&6; } else OCAMLC=$OCAMLCDOTOPT fi fi # checking for ocamlopt.opt if test "$OCAMLOPT" != "no" ; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlopt.opt", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlopt.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLOPTDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLOPTDOTOPT"; then ac_cv_prog_OCAMLOPTDOTOPT="$OCAMLOPTDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLOPTDOTOPT=$ac_cv_prog_OCAMLOPTDOTOPT if test -n "$OCAMLOPTDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPTDOTOPT" >&5 $as_echo "$OCAMLOPTDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLOPTDOTOPT"; then ac_ct_OCAMLOPTDOTOPT=$OCAMLOPTDOTOPT # Extract the first word of "ocamlopt.opt", so it can be a program name with args. set dummy ocamlopt.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLOPTDOTOPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLOPTDOTOPT"; then ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="$ac_ct_OCAMLOPTDOTOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="ocamlopt.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLOPTDOTOPT=$ac_cv_prog_ac_ct_OCAMLOPTDOTOPT if test -n "$ac_ct_OCAMLOPTDOTOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLOPTDOTOPT" >&5 $as_echo "$ac_ct_OCAMLOPTDOTOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLOPTDOTOPT" = x; then OCAMLOPTDOTOPT="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLOPTDOTOPT=$ac_ct_OCAMLOPTDOTOPT fi else OCAMLOPTDOTOPT="$ac_cv_prog_OCAMLOPTDOTOPT" fi if test "$OCAMLOPTDOTOPT" != "no"; then TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if test "$TMPVERSION" != "$OCAMLVERSION" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc; ocamlopt.opt discarded." >&5 $as_echo "version differs from ocamlc; ocamlopt.opt discarded." >&6; } else OCAMLOPT=$OCAMLOPTDOTOPT fi fi fi fi # checking for ocaml toplevel if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocaml", so it can be a program name with args. set dummy ${ac_tool_prefix}ocaml; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAML+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAML"; then ac_cv_prog_OCAML="$OCAML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAML="${ac_tool_prefix}ocaml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAML=$ac_cv_prog_OCAML if test -n "$OCAML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML" >&5 $as_echo "$OCAML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAML"; then ac_ct_OCAML=$OCAML # Extract the first word of "ocaml", so it can be a program name with args. set dummy ocaml; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAML+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAML"; then ac_cv_prog_ac_ct_OCAML="$ac_ct_OCAML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAML="ocaml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAML=$ac_cv_prog_ac_ct_OCAML if test -n "$ac_ct_OCAML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAML" >&5 $as_echo "$ac_ct_OCAML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAML" = x; then OCAML="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAML=$ac_ct_OCAML fi else OCAML="$ac_cv_prog_OCAML" fi # checking for ocamldep if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamldep", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamldep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLDEP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDEP"; then ac_cv_prog_OCAMLDEP="$OCAMLDEP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLDEP=$ac_cv_prog_OCAMLDEP if test -n "$OCAMLDEP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5 $as_echo "$OCAMLDEP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLDEP"; then ac_ct_OCAMLDEP=$OCAMLDEP # Extract the first word of "ocamldep", so it can be a program name with args. set dummy ocamldep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLDEP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDEP"; then ac_cv_prog_ac_ct_OCAMLDEP="$ac_ct_OCAMLDEP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLDEP="ocamldep" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLDEP=$ac_cv_prog_ac_ct_OCAMLDEP if test -n "$ac_ct_OCAMLDEP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDEP" >&5 $as_echo "$ac_ct_OCAMLDEP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLDEP" = x; then OCAMLDEP="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLDEP=$ac_ct_OCAMLDEP fi else OCAMLDEP="$ac_cv_prog_OCAMLDEP" fi # checking for ocamlmktop if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlmktop", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlmktop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLMKTOP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKTOP"; then ac_cv_prog_OCAMLMKTOP="$OCAMLMKTOP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP if test -n "$OCAMLMKTOP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKTOP" >&5 $as_echo "$OCAMLMKTOP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLMKTOP"; then ac_ct_OCAMLMKTOP=$OCAMLMKTOP # Extract the first word of "ocamlmktop", so it can be a program name with args. set dummy ocamlmktop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLMKTOP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLMKTOP"; then ac_cv_prog_ac_ct_OCAMLMKTOP="$ac_ct_OCAMLMKTOP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLMKTOP="ocamlmktop" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLMKTOP=$ac_cv_prog_ac_ct_OCAMLMKTOP if test -n "$ac_ct_OCAMLMKTOP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLMKTOP" >&5 $as_echo "$ac_ct_OCAMLMKTOP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLMKTOP" = x; then OCAMLMKTOP="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLMKTOP=$ac_ct_OCAMLMKTOP fi else OCAMLMKTOP="$ac_cv_prog_OCAMLMKTOP" fi # checking for ocamlmklib if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlmklib", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlmklib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLMKLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKLIB"; then ac_cv_prog_OCAMLMKLIB="$OCAMLMKLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLMKLIB=$ac_cv_prog_OCAMLMKLIB if test -n "$OCAMLMKLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKLIB" >&5 $as_echo "$OCAMLMKLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLMKLIB"; then ac_ct_OCAMLMKLIB=$OCAMLMKLIB # Extract the first word of "ocamlmklib", so it can be a program name with args. set dummy ocamlmklib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLMKLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLMKLIB"; then ac_cv_prog_ac_ct_OCAMLMKLIB="$ac_ct_OCAMLMKLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLMKLIB="ocamlmklib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLMKLIB=$ac_cv_prog_ac_ct_OCAMLMKLIB if test -n "$ac_ct_OCAMLMKLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLMKLIB" >&5 $as_echo "$ac_ct_OCAMLMKLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLMKLIB" = x; then OCAMLMKLIB="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLMKLIB=$ac_ct_OCAMLMKLIB fi else OCAMLMKLIB="$ac_cv_prog_OCAMLMKLIB" fi # checking for ocamldoc if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamldoc", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamldoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLDOC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDOC"; then ac_cv_prog_OCAMLDOC="$OCAMLDOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLDOC=$ac_cv_prog_OCAMLDOC if test -n "$OCAMLDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOC" >&5 $as_echo "$OCAMLDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLDOC"; then ac_ct_OCAMLDOC=$OCAMLDOC # Extract the first word of "ocamldoc", so it can be a program name with args. set dummy ocamldoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDOC"; then ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC if test -n "$ac_ct_OCAMLDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOC" >&5 $as_echo "$ac_ct_OCAMLDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLDOC" = x; then OCAMLDOC="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLDOC=$ac_ct_OCAMLDOC fi else OCAMLDOC="$ac_cv_prog_OCAMLDOC" fi # checking for ocamlbuild if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLBUILD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLBUILD"; then ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLBUILD=$ac_cv_prog_OCAMLBUILD if test -n "$OCAMLBUILD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLBUILD" >&5 $as_echo "$OCAMLBUILD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLBUILD"; then ac_ct_OCAMLBUILD=$OCAMLBUILD # Extract the first word of "ocamlbuild", so it can be a program name with args. set dummy ocamlbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLBUILD"; then ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD if test -n "$ac_ct_OCAMLBUILD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLBUILD" >&5 $as_echo "$ac_ct_OCAMLBUILD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLBUILD" = x; then OCAMLBUILD="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLBUILD=$ac_ct_OCAMLBUILD fi else OCAMLBUILD="$ac_cv_prog_OCAMLBUILD" fi # checking for ocamlfind if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args. set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLFIND"; then ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCAMLFIND=$ac_cv_prog_OCAMLFIND if test -n "$OCAMLFIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 $as_echo "$OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OCAMLFIND"; then ac_ct_OCAMLFIND=$OCAMLFIND # Extract the first word of "ocamlfind", so it can be a program name with args. set dummy ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLFIND"; then ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND if test -n "$ac_ct_OCAMLFIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5 $as_echo "$ac_ct_OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OCAMLFIND" = x; then OCAMLFIND="no" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OCAMLFIND=$ac_ct_OCAMLFIND fi else OCAMLFIND="$ac_cv_prog_OCAMLFIND" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package bytes" >&5 $as_echo_n "checking for OCaml findlib package bytes... " >&6; } unset found unset pkg found=no for pkg in bytes ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_bytes=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_bytes=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package lwt.unix" >&5 $as_echo_n "checking for OCaml findlib package lwt.unix... " >&6; } unset found unset pkg found=no for pkg in lwt.unix ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_lwt_unix=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_lwt_unix=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package lwt_ppx" >&5 $as_echo_n "checking for OCaml findlib package lwt_ppx... " >&6; } unset found unset pkg found=no for pkg in lwt_ppx lwt.ppx ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } OCAML_PKG_lwt_ppx=$pkg found=yes break fi done if test "$found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } OCAML_PKG_lwt_ppx=no fi INSTALLDIR=$OCAMLLIB/curl if test "x$prefix" = xNONE; then $as_echo_n "checking for prefix by " >&6 # Extract the first word of "ocamlc", so it can be a program name with args. set dummy ocamlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_prefix_program+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_prefix_program in [\\/]* | ?:[\\/]*) ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_prefix_program=$ac_cv_path_ac_prefix_program if test -n "$ac_prefix_program"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prefix_program" >&5 $as_echo "$ac_prefix_program" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$ac_prefix_program"; then prefix=`$as_dirname -- "$ac_prefix_program" || $as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ X"$ac_prefix_program" : 'X\(//\)$' \| \ X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_prefix_program" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` prefix=`$as_dirname -- "$prefix" || $as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$prefix" : 'X\(//\)[^/]' \| \ X"$prefix" : 'X\(//\)$' \| \ X"$prefix" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$prefix" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` fi fi if test "$OCAMLFIND" == "no"; then : $OCAMLC -I +compiler-libs ocamlcommon.cma print_ext.ml -o print_ext else $OCAMLFIND c -linkpkg -package compiler-libs.common print_ext.ml -o print_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bin-annot support" >&5 $as_echo_n "checking for bin-annot support... " >&6; } if test "$OCAMLVERSION" \> "4"; then : OCAML_HAS_BIN_ANNOT=yes else OCAML_HAS_BIN_ANNOT=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML_HAS_BIN_ANNOT" >&5 $as_echo "$OCAML_HAS_BIN_ANNOT" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ext_dll" >&5 $as_echo_n "checking for ext_dll... " >&6; } EXT_DLL=`./print_ext dll || $OCAMLC -config | fgrep ext_dll | sed -e "s/.*: //"` if test "$?" -eq 0 ; then : else as_fn_error $? "failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXT_DLL" >&5 $as_echo "$EXT_DLL" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ext_lib" >&5 $as_echo_n "checking for ext_lib... " >&6; } EXT_LIB=`./print_ext lib || $OCAMLC -config | fgrep ext_lib | sed -e "s/.*: //"` if test "$?" -eq 0 ; then : else as_fn_error $? "failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXT_LIB" >&5 $as_echo "$EXT_LIB" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ext_obj" >&5 $as_echo_n "checking for ext_obj... " >&6; } EXT_OBJ=`./print_ext obj || $OCAMLC -config | fgrep ext_obj | sed -e "s/.*: //"` if test "$?" -eq 0 ; then : else as_fn_error $? "failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXT_OBJ" >&5 $as_echo "$EXT_OBJ" >&6; } # set CFLAGS for tests below CFLAGS="$CFLAGS $CURLCFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in curl/curl.h do : ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CURL_CURL_H 1 _ACEOF else as_fn_error $? "libcurl header file missing" "$LINENO" 5 fi done ac_fn_c_check_decl "$LINENO" "CURLMOPT_TIMERFUNCTION" "ac_cv_have_decl_CURLMOPT_TIMERFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_TIMERFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_TIMERFUNCTION $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else as_fn_error $? "multi API is too old, need libcurl >= 7.16.0" "$LINENO" 5 fi ac_fn_c_check_decl "$LINENO" "CURLMOPT_TIMERDATA" "ac_cv_have_decl_CURLMOPT_TIMERDATA" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_TIMERDATA" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_TIMERDATA $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else as_fn_error $? "multi API is too old, need libcurl >= 7.16.0" "$LINENO" 5 fi ac_fn_c_check_decl "$LINENO" "CURLMOPT_SOCKETFUNCTION" "ac_cv_have_decl_CURLMOPT_SOCKETFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_SOCKETFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_SOCKETFUNCTION $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else as_fn_error $? "multi API is too old, need libcurl >= 7.16.0" "$LINENO" 5 fi ac_fn_c_check_decl "$LINENO" "CURLMOPT_SOCKETDATA" "ac_cv_have_decl_CURLMOPT_SOCKETDATA" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_SOCKETDATA" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_SOCKETDATA $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else as_fn_error $? "multi API is too old, need libcurl >= 7.16.0" "$LINENO" 5 fi ac_fn_c_check_decl "$LINENO" "CURLOPT_FILE" "ac_cv_have_decl_CURLOPT_FILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_URL" "ac_cv_have_decl_CURLOPT_URL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_URL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_URL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PORT" "ac_cv_have_decl_CURLOPT_PORT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PORT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PORT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROXY" "ac_cv_have_decl_CURLOPT_PROXY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROXY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROXY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_USERPWD" "ac_cv_have_decl_CURLOPT_USERPWD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_USERPWD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_USERPWD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROXYUSERPWD" "ac_cv_have_decl_CURLOPT_PROXYUSERPWD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROXYUSERPWD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROXYUSERPWD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_RANGE" "ac_cv_have_decl_CURLOPT_RANGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_RANGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_RANGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_INFILE" "ac_cv_have_decl_CURLOPT_INFILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_INFILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_INFILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_ERRORBUFFER" "ac_cv_have_decl_CURLOPT_ERRORBUFFER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_ERRORBUFFER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_ERRORBUFFER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_WRITEFUNCTION" "ac_cv_have_decl_CURLOPT_WRITEFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_WRITEFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_WRITEFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_READFUNCTION" "ac_cv_have_decl_CURLOPT_READFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_READFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_READFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_TIMEOUT" "ac_cv_have_decl_CURLOPT_TIMEOUT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_TIMEOUT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_TIMEOUT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_INFILESIZE" "ac_cv_have_decl_CURLOPT_INFILESIZE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_INFILESIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_INFILESIZE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_POSTFIELDS" "ac_cv_have_decl_CURLOPT_POSTFIELDS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_POSTFIELDS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_POSTFIELDS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_REFERER" "ac_cv_have_decl_CURLOPT_REFERER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_REFERER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_REFERER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTPPORT" "ac_cv_have_decl_CURLOPT_FTPPORT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTPPORT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTPPORT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_USERAGENT" "ac_cv_have_decl_CURLOPT_USERAGENT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_USERAGENT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_USERAGENT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_LOW_SPEED_LIMIT" "ac_cv_have_decl_CURLOPT_LOW_SPEED_LIMIT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_LOW_SPEED_LIMIT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_LOW_SPEED_LIMIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_LOW_SPEED_TIME" "ac_cv_have_decl_CURLOPT_LOW_SPEED_TIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_LOW_SPEED_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_LOW_SPEED_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_RESUME_FROM" "ac_cv_have_decl_CURLOPT_RESUME_FROM" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_RESUME_FROM" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_RESUME_FROM $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_COOKIE" "ac_cv_have_decl_CURLOPT_COOKIE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_COOKIE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_COOKIE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTPHEADER" "ac_cv_have_decl_CURLOPT_HTTPHEADER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTPHEADER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTPHEADER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTPPOST" "ac_cv_have_decl_CURLOPT_HTTPPOST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTPPOST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTPPOST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLCERT" "ac_cv_have_decl_CURLOPT_SSLCERT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLCERT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLCERT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLCERTPASSWD" "ac_cv_have_decl_CURLOPT_SSLCERTPASSWD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLCERTPASSWD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLCERTPASSWD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLKEYPASSWD" "ac_cv_have_decl_CURLOPT_SSLKEYPASSWD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLKEYPASSWD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLKEYPASSWD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CRLF" "ac_cv_have_decl_CURLOPT_CRLF" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CRLF" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CRLF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_QUOTE" "ac_cv_have_decl_CURLOPT_QUOTE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_QUOTE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_QUOTE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_WRITEHEADER" "ac_cv_have_decl_CURLOPT_WRITEHEADER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_WRITEHEADER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_WRITEHEADER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_COOKIEFILE" "ac_cv_have_decl_CURLOPT_COOKIEFILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_COOKIEFILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_COOKIEFILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLVERSION" "ac_cv_have_decl_CURLOPT_SSLVERSION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLVERSION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLVERSION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_TIMECONDITION" "ac_cv_have_decl_CURLOPT_TIMECONDITION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_TIMECONDITION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_TIMECONDITION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_TIMEVALUE" "ac_cv_have_decl_CURLOPT_TIMEVALUE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_TIMEVALUE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_TIMEVALUE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CUSTOMREQUEST" "ac_cv_have_decl_CURLOPT_CUSTOMREQUEST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CUSTOMREQUEST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CUSTOMREQUEST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_POSTQUOTE" "ac_cv_have_decl_CURLOPT_POSTQUOTE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_POSTQUOTE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_POSTQUOTE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_WRITEINFO" "ac_cv_have_decl_CURLOPT_WRITEINFO" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_WRITEINFO" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_WRITEINFO $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_VERBOSE" "ac_cv_have_decl_CURLOPT_VERBOSE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_VERBOSE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_VERBOSE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HEADER" "ac_cv_have_decl_CURLOPT_HEADER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HEADER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HEADER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_NOPROGRESS" "ac_cv_have_decl_CURLOPT_NOPROGRESS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_NOPROGRESS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_NOPROGRESS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_NOBODY" "ac_cv_have_decl_CURLOPT_NOBODY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_NOBODY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_NOBODY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FAILONERROR" "ac_cv_have_decl_CURLOPT_FAILONERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FAILONERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FAILONERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_UPLOAD" "ac_cv_have_decl_CURLOPT_UPLOAD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_UPLOAD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_UPLOAD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_POST" "ac_cv_have_decl_CURLOPT_POST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_POST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_POST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTPLISTONLY" "ac_cv_have_decl_CURLOPT_FTPLISTONLY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTPLISTONLY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTPLISTONLY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTPAPPEND" "ac_cv_have_decl_CURLOPT_FTPAPPEND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTPAPPEND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTPAPPEND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_NETRC" "ac_cv_have_decl_CURLOPT_NETRC" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_NETRC" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_NETRC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FOLLOWLOCATION" "ac_cv_have_decl_CURLOPT_FOLLOWLOCATION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FOLLOWLOCATION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FOLLOWLOCATION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_TRANSFERTEXT" "ac_cv_have_decl_CURLOPT_TRANSFERTEXT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_TRANSFERTEXT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_TRANSFERTEXT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PUT" "ac_cv_have_decl_CURLOPT_PUT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PUT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PUT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROGRESSFUNCTION" "ac_cv_have_decl_CURLOPT_PROGRESSFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROGRESSFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROGRESSFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROGRESSDATA" "ac_cv_have_decl_CURLOPT_PROGRESSDATA" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROGRESSDATA" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROGRESSDATA $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_AUTOREFERER" "ac_cv_have_decl_CURLOPT_AUTOREFERER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_AUTOREFERER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_AUTOREFERER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROXYPORT" "ac_cv_have_decl_CURLOPT_PROXYPORT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROXYPORT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROXYPORT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_POSTFIELDSIZE" "ac_cv_have_decl_CURLOPT_POSTFIELDSIZE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_POSTFIELDSIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_POSTFIELDSIZE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTPPROXYTUNNEL" "ac_cv_have_decl_CURLOPT_HTTPPROXYTUNNEL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTPPROXYTUNNEL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTPPROXYTUNNEL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_INTERFACE" "ac_cv_have_decl_CURLOPT_INTERFACE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_INTERFACE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_INTERFACE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_KRB4LEVEL" "ac_cv_have_decl_CURLOPT_KRB4LEVEL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_KRB4LEVEL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_KRB4LEVEL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSL_VERIFYPEER" "ac_cv_have_decl_CURLOPT_SSL_VERIFYPEER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSL_VERIFYPEER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSL_VERIFYPEER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CAINFO" "ac_cv_have_decl_CURLOPT_CAINFO" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CAINFO" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CAINFO $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAXREDIRS" "ac_cv_have_decl_CURLOPT_MAXREDIRS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAXREDIRS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAXREDIRS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FILETIME" "ac_cv_have_decl_CURLOPT_FILETIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FILETIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FILETIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_TELNETOPTIONS" "ac_cv_have_decl_CURLOPT_TELNETOPTIONS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_TELNETOPTIONS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_TELNETOPTIONS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAXCONNECTS" "ac_cv_have_decl_CURLOPT_MAXCONNECTS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAXCONNECTS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAXCONNECTS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CLOSEPOLICY" "ac_cv_have_decl_CURLOPT_CLOSEPOLICY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CLOSEPOLICY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CLOSEPOLICY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FRESH_CONNECT" "ac_cv_have_decl_CURLOPT_FRESH_CONNECT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FRESH_CONNECT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FRESH_CONNECT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FORBID_REUSE" "ac_cv_have_decl_CURLOPT_FORBID_REUSE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FORBID_REUSE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FORBID_REUSE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_RANDOM_FILE" "ac_cv_have_decl_CURLOPT_RANDOM_FILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_RANDOM_FILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_RANDOM_FILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_EGDSOCKET" "ac_cv_have_decl_CURLOPT_EGDSOCKET" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_EGDSOCKET" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_EGDSOCKET $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CONNECTTIMEOUT" "ac_cv_have_decl_CURLOPT_CONNECTTIMEOUT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CONNECTTIMEOUT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CONNECTTIMEOUT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HEADERFUNCTION" "ac_cv_have_decl_CURLOPT_HEADERFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HEADERFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HEADERFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTPGET" "ac_cv_have_decl_CURLOPT_HTTPGET" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTPGET" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTPGET $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSL_VERIFYHOST" "ac_cv_have_decl_CURLOPT_SSL_VERIFYHOST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSL_VERIFYHOST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSL_VERIFYHOST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_COOKIEJAR" "ac_cv_have_decl_CURLOPT_COOKIEJAR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_COOKIEJAR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_COOKIEJAR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSL_CIPHER_LIST" "ac_cv_have_decl_CURLOPT_SSL_CIPHER_LIST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSL_CIPHER_LIST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSL_CIPHER_LIST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTP_VERSION" "ac_cv_have_decl_CURLOPT_HTTP_VERSION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTP_VERSION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTP_VERSION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_USE_EPSV" "ac_cv_have_decl_CURLOPT_FTP_USE_EPSV" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_USE_EPSV" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_USE_EPSV $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLCERTTYPE" "ac_cv_have_decl_CURLOPT_SSLCERTTYPE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLCERTTYPE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLCERTTYPE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLKEY" "ac_cv_have_decl_CURLOPT_SSLKEY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLKEY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLKEY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLKEYTYPE" "ac_cv_have_decl_CURLOPT_SSLKEYTYPE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLKEYTYPE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLKEYTYPE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLENGINE" "ac_cv_have_decl_CURLOPT_SSLENGINE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLENGINE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLENGINE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSLENGINE_DEFAULT" "ac_cv_have_decl_CURLOPT_SSLENGINE_DEFAULT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSLENGINE_DEFAULT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSLENGINE_DEFAULT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_DNS_USE_GLOBAL_CACHE" "ac_cv_have_decl_CURLOPT_DNS_USE_GLOBAL_CACHE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_DNS_USE_GLOBAL_CACHE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_DNS_USE_GLOBAL_CACHE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_DNS_CACHE_TIMEOUT" "ac_cv_have_decl_CURLOPT_DNS_CACHE_TIMEOUT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_DNS_CACHE_TIMEOUT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_DNS_CACHE_TIMEOUT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PREQUOTE" "ac_cv_have_decl_CURLOPT_PREQUOTE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PREQUOTE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PREQUOTE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_DEBUGFUNCTION" "ac_cv_have_decl_CURLOPT_DEBUGFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_DEBUGFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_DEBUGFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_DEBUGDATA" "ac_cv_have_decl_CURLOPT_DEBUGDATA" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_DEBUGDATA" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_DEBUGDATA $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_COOKIESESSION" "ac_cv_have_decl_CURLOPT_COOKIESESSION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_COOKIESESSION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_COOKIESESSION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CAPATH" "ac_cv_have_decl_CURLOPT_CAPATH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CAPATH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CAPATH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_BUFFERSIZE" "ac_cv_have_decl_CURLOPT_BUFFERSIZE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_BUFFERSIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_BUFFERSIZE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_NOSIGNAL" "ac_cv_have_decl_CURLOPT_NOSIGNAL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_NOSIGNAL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_NOSIGNAL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SHARE" "ac_cv_have_decl_CURLOPT_SHARE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SHARE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SHARE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROXYTYPE" "ac_cv_have_decl_CURLOPT_PROXYTYPE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROXYTYPE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROXYTYPE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_ENCODING" "ac_cv_have_decl_CURLOPT_ENCODING" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_ENCODING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_ENCODING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTP200ALIASES" "ac_cv_have_decl_CURLOPT_HTTP200ALIASES" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTP200ALIASES" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTP200ALIASES $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_UNRESTRICTED_AUTH" "ac_cv_have_decl_CURLOPT_UNRESTRICTED_AUTH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_UNRESTRICTED_AUTH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_UNRESTRICTED_AUTH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_USE_EPRT" "ac_cv_have_decl_CURLOPT_FTP_USE_EPRT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_USE_EPRT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_USE_EPRT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTPAUTH" "ac_cv_have_decl_CURLOPT_HTTPAUTH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTPAUTH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTPAUTH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_CREATE_MISSING_DIRS" "ac_cv_have_decl_CURLOPT_FTP_CREATE_MISSING_DIRS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_CREATE_MISSING_DIRS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_CREATE_MISSING_DIRS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROXYAUTH" "ac_cv_have_decl_CURLOPT_PROXYAUTH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROXYAUTH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROXYAUTH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_RESPONSE_TIMEOUT" "ac_cv_have_decl_CURLOPT_FTP_RESPONSE_TIMEOUT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_RESPONSE_TIMEOUT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_RESPONSE_TIMEOUT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_IPRESOLVE" "ac_cv_have_decl_CURLOPT_IPRESOLVE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_IPRESOLVE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_IPRESOLVE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAXFILESIZE" "ac_cv_have_decl_CURLOPT_MAXFILESIZE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAXFILESIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAXFILESIZE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_INFILESIZE_LARGE" "ac_cv_have_decl_CURLOPT_INFILESIZE_LARGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_INFILESIZE_LARGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_INFILESIZE_LARGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_RESUME_FROM_LARGE" "ac_cv_have_decl_CURLOPT_RESUME_FROM_LARGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_RESUME_FROM_LARGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_RESUME_FROM_LARGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAXFILESIZE_LARGE" "ac_cv_have_decl_CURLOPT_MAXFILESIZE_LARGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAXFILESIZE_LARGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAXFILESIZE_LARGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_NETRC_FILE" "ac_cv_have_decl_CURLOPT_NETRC_FILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_NETRC_FILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_NETRC_FILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_SSL" "ac_cv_have_decl_CURLOPT_FTP_SSL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_SSL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_SSL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_POSTFIELDSIZE_LARGE" "ac_cv_have_decl_CURLOPT_POSTFIELDSIZE_LARGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_POSTFIELDSIZE_LARGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_POSTFIELDSIZE_LARGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_TCP_NODELAY" "ac_cv_have_decl_CURLOPT_TCP_NODELAY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_TCP_NODELAY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_TCP_NODELAY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTPSSLAUTH" "ac_cv_have_decl_CURLOPT_FTPSSLAUTH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTPSSLAUTH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTPSSLAUTH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_IOCTLFUNCTION" "ac_cv_have_decl_CURLOPT_IOCTLFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_IOCTLFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_IOCTLFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_ACCOUNT" "ac_cv_have_decl_CURLOPT_FTP_ACCOUNT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_ACCOUNT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_ACCOUNT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_COOKIELIST" "ac_cv_have_decl_CURLOPT_COOKIELIST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_COOKIELIST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_COOKIELIST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_IGNORE_CONTENT_LENGTH" "ac_cv_have_decl_CURLOPT_IGNORE_CONTENT_LENGTH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_IGNORE_CONTENT_LENGTH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_IGNORE_CONTENT_LENGTH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_SKIP_PASV_IP" "ac_cv_have_decl_CURLOPT_FTP_SKIP_PASV_IP" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_SKIP_PASV_IP" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_SKIP_PASV_IP $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_FILEMETHOD" "ac_cv_have_decl_CURLOPT_FTP_FILEMETHOD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_FILEMETHOD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_FILEMETHOD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_LOCALPORT" "ac_cv_have_decl_CURLOPT_LOCALPORT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_LOCALPORT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_LOCALPORT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_LOCALPORTRANGE" "ac_cv_have_decl_CURLOPT_LOCALPORTRANGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_LOCALPORTRANGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_LOCALPORTRANGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CONNECT_ONLY" "ac_cv_have_decl_CURLOPT_CONNECT_ONLY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CONNECT_ONLY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CONNECT_ONLY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAX_SEND_SPEED_LARGE" "ac_cv_have_decl_CURLOPT_MAX_SEND_SPEED_LARGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAX_SEND_SPEED_LARGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAX_SEND_SPEED_LARGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAX_RECV_SPEED_LARGE" "ac_cv_have_decl_CURLOPT_MAX_RECV_SPEED_LARGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAX_RECV_SPEED_LARGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAX_RECV_SPEED_LARGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_ALTERNATIVE_TO_USER" "ac_cv_have_decl_CURLOPT_FTP_ALTERNATIVE_TO_USER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_ALTERNATIVE_TO_USER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_ALTERNATIVE_TO_USER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSL_SESSIONID_CACHE" "ac_cv_have_decl_CURLOPT_SSL_SESSIONID_CACHE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSL_SESSIONID_CACHE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSL_SESSIONID_CACHE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSH_AUTH_TYPES" "ac_cv_have_decl_CURLOPT_SSH_AUTH_TYPES" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSH_AUTH_TYPES" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSH_AUTH_TYPES $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSH_PUBLIC_KEYFILE" "ac_cv_have_decl_CURLOPT_SSH_PUBLIC_KEYFILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSH_PUBLIC_KEYFILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSH_PUBLIC_KEYFILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSH_PRIVATE_KEYFILE" "ac_cv_have_decl_CURLOPT_SSH_PRIVATE_KEYFILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSH_PRIVATE_KEYFILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSH_PRIVATE_KEYFILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_FTP_SSL_CCC" "ac_cv_have_decl_CURLOPT_FTP_SSL_CCC" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_FTP_SSL_CCC" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_FTP_SSL_CCC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_TIMEOUT_MS" "ac_cv_have_decl_CURLOPT_TIMEOUT_MS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_TIMEOUT_MS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_TIMEOUT_MS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CONNECTTIMEOUT_MS" "ac_cv_have_decl_CURLOPT_CONNECTTIMEOUT_MS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CONNECTTIMEOUT_MS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CONNECTTIMEOUT_MS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTP_TRANSFER_DECODING" "ac_cv_have_decl_CURLOPT_HTTP_TRANSFER_DECODING" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTP_TRANSFER_DECODING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTP_TRANSFER_DECODING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_HTTP_CONTENT_DECODING" "ac_cv_have_decl_CURLOPT_HTTP_CONTENT_DECODING" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_HTTP_CONTENT_DECODING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_HTTP_CONTENT_DECODING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_NEW_FILE_PERMS" "ac_cv_have_decl_CURLOPT_NEW_FILE_PERMS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_NEW_FILE_PERMS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_NEW_FILE_PERMS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_NEW_DIRECTORY_PERMS" "ac_cv_have_decl_CURLOPT_NEW_DIRECTORY_PERMS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_NEW_DIRECTORY_PERMS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_NEW_DIRECTORY_PERMS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_POST301" "ac_cv_have_decl_CURLOPT_POST301" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_POST301" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_POST301 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SSH_HOST_PUBLIC_KEY_MD5" "ac_cv_have_decl_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_COPYPOSTFIELDS" "ac_cv_have_decl_CURLOPT_COPYPOSTFIELDS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_COPYPOSTFIELDS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_COPYPOSTFIELDS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROXY_TRANSFER_MODE" "ac_cv_have_decl_CURLOPT_PROXY_TRANSFER_MODE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROXY_TRANSFER_MODE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROXY_TRANSFER_MODE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_SEEKFUNCTION" "ac_cv_have_decl_CURLOPT_SEEKFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_SEEKFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_SEEKFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_OPENSOCKETFUNCTION" "ac_cv_have_decl_CURLOPT_OPENSOCKETFUNCTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_OPENSOCKETFUNCTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_OPENSOCKETFUNCTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PROTOCOLS" "ac_cv_have_decl_CURLOPT_PROTOCOLS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PROTOCOLS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PROTOCOLS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_REDIR_PROTOCOLS" "ac_cv_have_decl_CURLOPT_REDIR_PROTOCOLS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_REDIR_PROTOCOLS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_REDIR_PROTOCOLS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_RESOLVE" "ac_cv_have_decl_CURLOPT_RESOLVE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_RESOLVE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_RESOLVE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_DNS_SERVERS" "ac_cv_have_decl_CURLOPT_DNS_SERVERS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_DNS_SERVERS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_DNS_SERVERS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAIL_FROM" "ac_cv_have_decl_CURLOPT_MAIL_FROM" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAIL_FROM" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAIL_FROM $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MAIL_RCPT" "ac_cv_have_decl_CURLOPT_MAIL_RCPT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MAIL_RCPT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MAIL_RCPT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PIPEWAIT" "ac_cv_have_decl_CURLOPT_PIPEWAIT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PIPEWAIT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PIPEWAIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CERTINFO" "ac_cv_have_decl_CURLOPT_CERTINFO" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CERTINFO" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CERTINFO $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_USERNAME" "ac_cv_have_decl_CURLOPT_USERNAME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_USERNAME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_USERNAME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_PASSWORD" "ac_cv_have_decl_CURLOPT_PASSWORD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_PASSWORD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_PASSWORD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_LOGIN_OPTIONS" "ac_cv_have_decl_CURLOPT_LOGIN_OPTIONS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_LOGIN_OPTIONS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_LOGIN_OPTIONS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_CONNECT_TO" "ac_cv_have_decl_CURLOPT_CONNECT_TO" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_CONNECT_TO" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_CONNECT_TO $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_POSTREDIR" "ac_cv_have_decl_CURLOPT_POSTREDIR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_POSTREDIR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_POSTREDIR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLOPT_MIMEPOST" "ac_cv_have_decl_CURLOPT_MIMEPOST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLOPT_MIMEPOST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLOPT_MIMEPOST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_EFFECTIVE_URL" "ac_cv_have_decl_CURLINFO_EFFECTIVE_URL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_EFFECTIVE_URL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_EFFECTIVE_URL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_RESPONSE_CODE" "ac_cv_have_decl_CURLINFO_RESPONSE_CODE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_RESPONSE_CODE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_RESPONSE_CODE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_TOTAL_TIME" "ac_cv_have_decl_CURLINFO_TOTAL_TIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_TOTAL_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_TOTAL_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_NAMELOOKUP_TIME" "ac_cv_have_decl_CURLINFO_NAMELOOKUP_TIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_NAMELOOKUP_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_NAMELOOKUP_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_CONNECT_TIME" "ac_cv_have_decl_CURLINFO_CONNECT_TIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_CONNECT_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_CONNECT_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_PRETRANSFER_TIME" "ac_cv_have_decl_CURLINFO_PRETRANSFER_TIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_PRETRANSFER_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_PRETRANSFER_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_SIZE_UPLOAD" "ac_cv_have_decl_CURLINFO_SIZE_UPLOAD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_SIZE_UPLOAD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_SIZE_UPLOAD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_SIZE_DOWNLOAD" "ac_cv_have_decl_CURLINFO_SIZE_DOWNLOAD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_SIZE_DOWNLOAD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_SIZE_DOWNLOAD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_SPEED_DOWNLOAD" "ac_cv_have_decl_CURLINFO_SPEED_DOWNLOAD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_SPEED_DOWNLOAD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_SPEED_DOWNLOAD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_SPEED_UPLOAD" "ac_cv_have_decl_CURLINFO_SPEED_UPLOAD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_SPEED_UPLOAD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_SPEED_UPLOAD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_HEADER_SIZE" "ac_cv_have_decl_CURLINFO_HEADER_SIZE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_HEADER_SIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_HEADER_SIZE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_REQUEST_SIZE" "ac_cv_have_decl_CURLINFO_REQUEST_SIZE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_REQUEST_SIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_REQUEST_SIZE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_SSL_VERIFYRESULT" "ac_cv_have_decl_CURLINFO_SSL_VERIFYRESULT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_SSL_VERIFYRESULT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_SSL_VERIFYRESULT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_FILETIME" "ac_cv_have_decl_CURLINFO_FILETIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_FILETIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_FILETIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_CONTENT_LENGTH_DOWNLOAD" "ac_cv_have_decl_CURLINFO_CONTENT_LENGTH_DOWNLOAD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_CONTENT_LENGTH_DOWNLOAD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_CONTENT_LENGTH_DOWNLOAD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_CONTENT_LENGTH_UPLOAD" "ac_cv_have_decl_CURLINFO_CONTENT_LENGTH_UPLOAD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_CONTENT_LENGTH_UPLOAD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_CONTENT_LENGTH_UPLOAD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_STARTTRANSFER_TIME" "ac_cv_have_decl_CURLINFO_STARTTRANSFER_TIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_STARTTRANSFER_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_STARTTRANSFER_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_CONTENT_TYPE" "ac_cv_have_decl_CURLINFO_CONTENT_TYPE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_CONTENT_TYPE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_CONTENT_TYPE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_REDIRECT_TIME" "ac_cv_have_decl_CURLINFO_REDIRECT_TIME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_REDIRECT_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_REDIRECT_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_REDIRECT_COUNT" "ac_cv_have_decl_CURLINFO_REDIRECT_COUNT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_REDIRECT_COUNT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_REDIRECT_COUNT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_HTTP_CONNECTCODE" "ac_cv_have_decl_CURLINFO_HTTP_CONNECTCODE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_HTTP_CONNECTCODE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_HTTP_CONNECTCODE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_HTTPAUTH_AVAIL" "ac_cv_have_decl_CURLINFO_HTTPAUTH_AVAIL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_HTTPAUTH_AVAIL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_HTTPAUTH_AVAIL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_PROXYAUTH_AVAIL" "ac_cv_have_decl_CURLINFO_PROXYAUTH_AVAIL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_PROXYAUTH_AVAIL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_PROXYAUTH_AVAIL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_OS_ERRNO" "ac_cv_have_decl_CURLINFO_OS_ERRNO" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_OS_ERRNO" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_OS_ERRNO $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_NUM_CONNECTS" "ac_cv_have_decl_CURLINFO_NUM_CONNECTS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_NUM_CONNECTS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_NUM_CONNECTS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_SSL_ENGINES" "ac_cv_have_decl_CURLINFO_SSL_ENGINES" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_SSL_ENGINES" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_SSL_ENGINES $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_COOKIELIST" "ac_cv_have_decl_CURLINFO_COOKIELIST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_COOKIELIST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_COOKIELIST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_LASTSOCKET" "ac_cv_have_decl_CURLINFO_LASTSOCKET" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_LASTSOCKET" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_LASTSOCKET $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_FTP_ENTRY_PATH" "ac_cv_have_decl_CURLINFO_FTP_ENTRY_PATH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_FTP_ENTRY_PATH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_FTP_ENTRY_PATH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_REDIRECT_URL" "ac_cv_have_decl_CURLINFO_REDIRECT_URL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_REDIRECT_URL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_REDIRECT_URL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_PRIMARY_IP" "ac_cv_have_decl_CURLINFO_PRIMARY_IP" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_PRIMARY_IP" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_PRIMARY_IP $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_LOCAL_IP" "ac_cv_have_decl_CURLINFO_LOCAL_IP" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_LOCAL_IP" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_LOCAL_IP $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_LOCAL_PORT" "ac_cv_have_decl_CURLINFO_LOCAL_PORT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_LOCAL_PORT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_LOCAL_PORT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_CONDITION_UNMET" "ac_cv_have_decl_CURLINFO_CONDITION_UNMET" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_CONDITION_UNMET" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_CONDITION_UNMET $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLINFO_CERTINFO" "ac_cv_have_decl_CURLINFO_CERTINFO" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLINFO_CERTINFO" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLINFO_CERTINFO $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_UNSUPPORTED_PROTOCOL" "ac_cv_have_decl_CURLE_UNSUPPORTED_PROTOCOL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_UNSUPPORTED_PROTOCOL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_UNSUPPORTED_PROTOCOL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FAILED_INIT" "ac_cv_have_decl_CURLE_FAILED_INIT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FAILED_INIT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FAILED_INIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_URL_MALFORMAT" "ac_cv_have_decl_CURLE_URL_MALFORMAT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_URL_MALFORMAT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_URL_MALFORMAT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_URL_MALFORMAT_USER" "ac_cv_have_decl_CURLE_URL_MALFORMAT_USER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_URL_MALFORMAT_USER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_URL_MALFORMAT_USER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_COULDNT_RESOLVE_PROXY" "ac_cv_have_decl_CURLE_COULDNT_RESOLVE_PROXY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_COULDNT_RESOLVE_PROXY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_COULDNT_RESOLVE_PROXY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_COULDNT_RESOLVE_HOST" "ac_cv_have_decl_CURLE_COULDNT_RESOLVE_HOST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_COULDNT_RESOLVE_HOST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_COULDNT_RESOLVE_HOST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_COULDNT_CONNECT" "ac_cv_have_decl_CURLE_COULDNT_CONNECT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_COULDNT_CONNECT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_COULDNT_CONNECT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_WEIRD_SERVER_REPLY" "ac_cv_have_decl_CURLE_FTP_WEIRD_SERVER_REPLY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_WEIRD_SERVER_REPLY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_WEIRD_SERVER_REPLY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_ACCESS_DENIED" "ac_cv_have_decl_CURLE_FTP_ACCESS_DENIED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_ACCESS_DENIED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_ACCESS_DENIED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_USER_PASSWORD_INCORRECT" "ac_cv_have_decl_CURLE_FTP_USER_PASSWORD_INCORRECT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_USER_PASSWORD_INCORRECT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_USER_PASSWORD_INCORRECT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_WEIRD_PASS_REPLY" "ac_cv_have_decl_CURLE_FTP_WEIRD_PASS_REPLY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_WEIRD_PASS_REPLY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_WEIRD_PASS_REPLY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_WEIRD_USER_REPLY" "ac_cv_have_decl_CURLE_FTP_WEIRD_USER_REPLY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_WEIRD_USER_REPLY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_WEIRD_USER_REPLY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_WEIRD_PASV_REPLY" "ac_cv_have_decl_CURLE_FTP_WEIRD_PASV_REPLY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_WEIRD_PASV_REPLY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_WEIRD_PASV_REPLY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_WEIRD_227_FORMAT" "ac_cv_have_decl_CURLE_FTP_WEIRD_227_FORMAT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_WEIRD_227_FORMAT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_WEIRD_227_FORMAT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_CANT_GET_HOST" "ac_cv_have_decl_CURLE_FTP_CANT_GET_HOST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_CANT_GET_HOST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_CANT_GET_HOST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_CANT_RECONNECT" "ac_cv_have_decl_CURLE_FTP_CANT_RECONNECT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_CANT_RECONNECT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_CANT_RECONNECT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_COULDNT_SET_BINARY" "ac_cv_have_decl_CURLE_FTP_COULDNT_SET_BINARY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_COULDNT_SET_BINARY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_COULDNT_SET_BINARY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_PARTIAL_FILE" "ac_cv_have_decl_CURLE_PARTIAL_FILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_PARTIAL_FILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_PARTIAL_FILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_COULDNT_RETR_FILE" "ac_cv_have_decl_CURLE_FTP_COULDNT_RETR_FILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_COULDNT_RETR_FILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_COULDNT_RETR_FILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_WRITE_ERROR" "ac_cv_have_decl_CURLE_FTP_WRITE_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_WRITE_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_WRITE_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_QUOTE_ERROR" "ac_cv_have_decl_CURLE_FTP_QUOTE_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_QUOTE_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_QUOTE_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_HTTP_RETURNED_ERROR" "ac_cv_have_decl_CURLE_HTTP_RETURNED_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_HTTP_RETURNED_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_HTTP_RETURNED_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_WRITE_ERROR" "ac_cv_have_decl_CURLE_WRITE_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_WRITE_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_WRITE_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_MALFORMAT_USER" "ac_cv_have_decl_CURLE_MALFORMAT_USER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_MALFORMAT_USER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_MALFORMAT_USER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_COULDNT_STOR_FILE" "ac_cv_have_decl_CURLE_FTP_COULDNT_STOR_FILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_COULDNT_STOR_FILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_COULDNT_STOR_FILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_READ_ERROR" "ac_cv_have_decl_CURLE_READ_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_READ_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_READ_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_OUT_OF_MEMORY" "ac_cv_have_decl_CURLE_OUT_OF_MEMORY" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_OUT_OF_MEMORY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_OUT_OF_MEMORY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_OPERATION_TIMEOUTED" "ac_cv_have_decl_CURLE_OPERATION_TIMEOUTED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_OPERATION_TIMEOUTED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_OPERATION_TIMEOUTED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_COULDNT_SET_ASCII" "ac_cv_have_decl_CURLE_FTP_COULDNT_SET_ASCII" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_COULDNT_SET_ASCII" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_COULDNT_SET_ASCII $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_PORT_FAILED" "ac_cv_have_decl_CURLE_FTP_PORT_FAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_PORT_FAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_PORT_FAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_COULDNT_USE_REST" "ac_cv_have_decl_CURLE_FTP_COULDNT_USE_REST" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_COULDNT_USE_REST" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_COULDNT_USE_REST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_COULDNT_GET_SIZE" "ac_cv_have_decl_CURLE_FTP_COULDNT_GET_SIZE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_COULDNT_GET_SIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_COULDNT_GET_SIZE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_HTTP_RANGE_ERROR" "ac_cv_have_decl_CURLE_HTTP_RANGE_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_HTTP_RANGE_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_HTTP_RANGE_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_HTTP_POST_ERROR" "ac_cv_have_decl_CURLE_HTTP_POST_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_HTTP_POST_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_HTTP_POST_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_CONNECT_ERROR" "ac_cv_have_decl_CURLE_SSL_CONNECT_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_CONNECT_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_CONNECT_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_BAD_DOWNLOAD_RESUME" "ac_cv_have_decl_CURLE_BAD_DOWNLOAD_RESUME" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_BAD_DOWNLOAD_RESUME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_BAD_DOWNLOAD_RESUME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FILE_COULDNT_READ_FILE" "ac_cv_have_decl_CURLE_FILE_COULDNT_READ_FILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FILE_COULDNT_READ_FILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FILE_COULDNT_READ_FILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_LDAP_CANNOT_BIND" "ac_cv_have_decl_CURLE_LDAP_CANNOT_BIND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_LDAP_CANNOT_BIND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_LDAP_CANNOT_BIND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_LDAP_SEARCH_FAILED" "ac_cv_have_decl_CURLE_LDAP_SEARCH_FAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_LDAP_SEARCH_FAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_LDAP_SEARCH_FAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_LIBRARY_NOT_FOUND" "ac_cv_have_decl_CURLE_LIBRARY_NOT_FOUND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_LIBRARY_NOT_FOUND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_LIBRARY_NOT_FOUND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FUNCTION_NOT_FOUND" "ac_cv_have_decl_CURLE_FUNCTION_NOT_FOUND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FUNCTION_NOT_FOUND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FUNCTION_NOT_FOUND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_ABORTED_BY_CALLBACK" "ac_cv_have_decl_CURLE_ABORTED_BY_CALLBACK" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_ABORTED_BY_CALLBACK" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_ABORTED_BY_CALLBACK $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_BAD_FUNCTION_ARGUMENT" "ac_cv_have_decl_CURLE_BAD_FUNCTION_ARGUMENT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_BAD_FUNCTION_ARGUMENT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_BAD_FUNCTION_ARGUMENT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_BAD_CALLING_ORDER" "ac_cv_have_decl_CURLE_BAD_CALLING_ORDER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_BAD_CALLING_ORDER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_BAD_CALLING_ORDER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_INTERFACE_FAILED" "ac_cv_have_decl_CURLE_INTERFACE_FAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_INTERFACE_FAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_INTERFACE_FAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_BAD_PASSWORD_ENTERED" "ac_cv_have_decl_CURLE_BAD_PASSWORD_ENTERED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_BAD_PASSWORD_ENTERED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_BAD_PASSWORD_ENTERED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_TOO_MANY_REDIRECTS" "ac_cv_have_decl_CURLE_TOO_MANY_REDIRECTS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_TOO_MANY_REDIRECTS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_TOO_MANY_REDIRECTS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_UNKNOWN_TELNET_OPTION" "ac_cv_have_decl_CURLE_UNKNOWN_TELNET_OPTION" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_UNKNOWN_TELNET_OPTION" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_UNKNOWN_TELNET_OPTION $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_TELNET_OPTION_SYNTAX" "ac_cv_have_decl_CURLE_TELNET_OPTION_SYNTAX" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_TELNET_OPTION_SYNTAX" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_TELNET_OPTION_SYNTAX $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_PEER_CERTIFICATE" "ac_cv_have_decl_CURLE_SSL_PEER_CERTIFICATE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_PEER_CERTIFICATE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_PEER_CERTIFICATE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_GOT_NOTHING" "ac_cv_have_decl_CURLE_GOT_NOTHING" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_GOT_NOTHING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_GOT_NOTHING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_ENGINE_NOTFOUND" "ac_cv_have_decl_CURLE_SSL_ENGINE_NOTFOUND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_ENGINE_NOTFOUND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_ENGINE_NOTFOUND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_ENGINE_SETFAILED" "ac_cv_have_decl_CURLE_SSL_ENGINE_SETFAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_ENGINE_SETFAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_ENGINE_SETFAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SEND_ERROR" "ac_cv_have_decl_CURLE_SEND_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SEND_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SEND_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_RECV_ERROR" "ac_cv_have_decl_CURLE_RECV_ERROR" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_RECV_ERROR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_RECV_ERROR $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SHARE_IN_USE" "ac_cv_have_decl_CURLE_SHARE_IN_USE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SHARE_IN_USE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SHARE_IN_USE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_CERTPROBLEM" "ac_cv_have_decl_CURLE_SSL_CERTPROBLEM" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_CERTPROBLEM" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_CERTPROBLEM $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_CIPHER" "ac_cv_have_decl_CURLE_SSL_CIPHER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_CIPHER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_CIPHER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_CACERT" "ac_cv_have_decl_CURLE_SSL_CACERT" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_CACERT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_CACERT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_BAD_CONTENT_ENCODING" "ac_cv_have_decl_CURLE_BAD_CONTENT_ENCODING" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_BAD_CONTENT_ENCODING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_BAD_CONTENT_ENCODING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_LDAP_INVALID_URL" "ac_cv_have_decl_CURLE_LDAP_INVALID_URL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_LDAP_INVALID_URL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_LDAP_INVALID_URL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FILESIZE_EXCEEDED" "ac_cv_have_decl_CURLE_FILESIZE_EXCEEDED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FILESIZE_EXCEEDED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FILESIZE_EXCEEDED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_FTP_SSL_FAILED" "ac_cv_have_decl_CURLE_FTP_SSL_FAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_FTP_SSL_FAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_FTP_SSL_FAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SEND_FAIL_REWIND" "ac_cv_have_decl_CURLE_SEND_FAIL_REWIND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SEND_FAIL_REWIND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SEND_FAIL_REWIND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_ENGINE_INITFAILED" "ac_cv_have_decl_CURLE_SSL_ENGINE_INITFAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_ENGINE_INITFAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_ENGINE_INITFAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_LOGIN_DENIED" "ac_cv_have_decl_CURLE_LOGIN_DENIED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_LOGIN_DENIED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_LOGIN_DENIED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_TFTP_NOTFOUND" "ac_cv_have_decl_CURLE_TFTP_NOTFOUND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_TFTP_NOTFOUND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_TFTP_NOTFOUND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_TFTP_PERM" "ac_cv_have_decl_CURLE_TFTP_PERM" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_TFTP_PERM" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_TFTP_PERM $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_REMOTE_DISK_FULL" "ac_cv_have_decl_CURLE_REMOTE_DISK_FULL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_REMOTE_DISK_FULL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_REMOTE_DISK_FULL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_TFTP_ILLEGAL" "ac_cv_have_decl_CURLE_TFTP_ILLEGAL" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_TFTP_ILLEGAL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_TFTP_ILLEGAL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_TFTP_UNKNOWNID" "ac_cv_have_decl_CURLE_TFTP_UNKNOWNID" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_TFTP_UNKNOWNID" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_TFTP_UNKNOWNID $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_REMOTE_FILE_EXISTS" "ac_cv_have_decl_CURLE_REMOTE_FILE_EXISTS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_REMOTE_FILE_EXISTS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_REMOTE_FILE_EXISTS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_TFTP_NOSUCHUSER" "ac_cv_have_decl_CURLE_TFTP_NOSUCHUSER" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_TFTP_NOSUCHUSER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_TFTP_NOSUCHUSER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_CONV_FAILED" "ac_cv_have_decl_CURLE_CONV_FAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_CONV_FAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_CONV_FAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_CONV_REQD" "ac_cv_have_decl_CURLE_CONV_REQD" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_CONV_REQD" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_CONV_REQD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_CACERT_BADFILE" "ac_cv_have_decl_CURLE_SSL_CACERT_BADFILE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_CACERT_BADFILE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_CACERT_BADFILE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_REMOTE_FILE_NOT_FOUND" "ac_cv_have_decl_CURLE_REMOTE_FILE_NOT_FOUND" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_REMOTE_FILE_NOT_FOUND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_REMOTE_FILE_NOT_FOUND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSH" "ac_cv_have_decl_CURLE_SSH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_SSL_SHUTDOWN_FAILED" "ac_cv_have_decl_CURLE_SSL_SHUTDOWN_FAILED" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_SSL_SHUTDOWN_FAILED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_SSL_SHUTDOWN_FAILED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLE_AGAIN" "ac_cv_have_decl_CURLE_AGAIN" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLE_AGAIN" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLE_AGAIN $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLMOPT_MAXCONNECTS" "ac_cv_have_decl_CURLMOPT_MAXCONNECTS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_MAXCONNECTS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_MAXCONNECTS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLMOPT_PIPELINING" "ac_cv_have_decl_CURLMOPT_PIPELINING" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_PIPELINING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_PIPELINING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLMOPT_MAX_PIPELINE_LENGTH" "ac_cv_have_decl_CURLMOPT_MAX_PIPELINE_LENGTH" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_MAX_PIPELINE_LENGTH" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_MAX_PIPELINE_LENGTH $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURLMOPT_MAX_HOST_CONNECTIONS" "ac_cv_have_decl_CURLMOPT_MAX_HOST_CONNECTIONS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURLMOPT_MAX_HOST_CONNECTIONS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURLMOPT_MAX_HOST_CONNECTIONS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_SSLVERSION_TLSv1_0" "ac_cv_have_decl_CURL_SSLVERSION_TLSv1_0" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_SSLVERSION_TLSv1_0" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_SSLVERSION_TLSV1_0 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_SSLVERSION_TLSv1_1" "ac_cv_have_decl_CURL_SSLVERSION_TLSv1_1" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_SSLVERSION_TLSv1_1" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_SSLVERSION_TLSV1_1 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_SSLVERSION_TLSv1_2" "ac_cv_have_decl_CURL_SSLVERSION_TLSv1_2" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_SSLVERSION_TLSv1_2" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_SSLVERSION_TLSV1_2 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_SSLVERSION_TLSv1_3" "ac_cv_have_decl_CURL_SSLVERSION_TLSv1_3" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_SSLVERSION_TLSv1_3" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_SSLVERSION_TLSV1_3 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_HTTP_VERSION_2" "ac_cv_have_decl_CURL_HTTP_VERSION_2" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_HTTP_VERSION_2" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_HTTP_VERSION_2 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_HTTP_VERSION_2_0" "ac_cv_have_decl_CURL_HTTP_VERSION_2_0" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_HTTP_VERSION_2_0" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_HTTP_VERSION_2_0 $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_HTTP_VERSION_2TLS" "ac_cv_have_decl_CURL_HTTP_VERSION_2TLS" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_HTTP_VERSION_2TLS" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_HTTP_VERSION_2TLS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE" "ac_cv_have_decl_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_VERSION_TLSAUTH_SRP" "ac_cv_have_decl_CURL_VERSION_TLSAUTH_SRP" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_VERSION_TLSAUTH_SRP" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_VERSION_TLSAUTH_SRP $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "CURL_VERSION_NTLM_WB" "ac_cv_have_decl_CURL_VERSION_NTLM_WB" " #include \"curl/curl.h\" " if test "x$ac_cv_have_decl_CURL_VERSION_NTLM_WB" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CURL_VERSION_NTLM_WB $ac_have_decl _ACEOF ac_config_headers="$ac_config_headers config.h" ac_config_files="$ac_config_files Makefile examples/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by ocurl $as_me 0.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ ocurl config.status 0.9.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ocurl-0.9.0/configure.ac000066400000000000000000000217171356304035200151430ustar00rootroot00000000000000dnl dnl ocurl autoconf input dnl AC_INIT(ocurl,0.9.0) MIN_LIBCURL_VERSION=7.28.0 AC_PROG_CC() AC_MSG_CHECKING([for libcurl cflags]) CURLCFLAGS=`pkg-config libcurl --cflags || curl-config --cflags` AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([libcurl was not found])] ) AC_MSG_RESULT([$CURLCFLAGS]) AC_MSG_CHECKING([for libcurl libs]) CURLLIBS=`pkg-config libcurl --libs || curl-config --libs` AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([libcurl was not found])] ) AC_MSG_RESULT([$CURLLIBS]) AC_MSG_CHECKING([for libcurl version >= $MIN_LIBCURL_VERSION]) LIBCURL_VERSION=`pkg-config libcurl --modversion || curl-config --version` (pkg-config libcurl && pkg-config libcurl --atleast-version=${MIN_LIBCURL_VERSION}) || curl-config --checkfor ${MIN_LIBCURL_VERSION} AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([${LIBCURL_VERSION} is too old])]) AC_MSG_RESULT([${LIBCURL_VERSION}]) AC_PROG_INSTALL() AC_PROG_OCAML() AC_PROG_FINDLIB() AC_CHECK_OCAML_PKG([bytes]) AC_CHECK_OCAML_PKG([lwt.unix]) AC_CHECK_OCAML_PKG([lwt_ppx],[lwt.ppx]) INSTALLDIR=$OCAMLLIB/curl AC_PREFIX_PROGRAM(ocamlc) AC_SUBST(CURLLIBS) AC_SUBST(OCAMLLIB) AC_SUBST(INSTALLDIR) AC_SUBST(OCAMLFIND) AC_SUBST(OCAML_PKG_bytes) AC_SUBST(OCAML_PKG_lwt_unix) AC_SUBST(OCAML_PKG_lwt_ppx) AS_IF([test "$OCAMLFIND" == "no"], [$OCAMLC -I +compiler-libs ocamlcommon.cma print_ext.ml -o print_ext], [$OCAMLFIND c -linkpkg -package compiler-libs.common print_ext.ml -o print_ext]) AC_MSG_CHECKING([for bin-annot support]) AS_IF([test "$OCAMLVERSION" \> "4"],[OCAML_HAS_BIN_ANNOT=yes],[OCAML_HAS_BIN_ANNOT=no]) AC_MSG_RESULT([$OCAML_HAS_BIN_ANNOT]) AC_SUBST(OCAML_HAS_BIN_ANNOT) AC_MSG_CHECKING([for ext_dll]) EXT_DLL=`./print_ext dll || $OCAMLC -config | fgrep ext_dll | sed -e "s/.*: //"` AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([failed])] ) AC_MSG_RESULT([$EXT_DLL]) AC_MSG_CHECKING([for ext_lib]) EXT_LIB=`./print_ext lib || $OCAMLC -config | fgrep ext_lib | sed -e "s/.*: //"` AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([failed])] ) AC_MSG_RESULT([$EXT_LIB]) AC_MSG_CHECKING([for ext_obj]) EXT_OBJ=`./print_ext obj || $OCAMLC -config | fgrep ext_obj | sed -e "s/.*: //"` AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([failed])] ) AC_MSG_RESULT([$EXT_OBJ]) AC_SUBST(EXT_DLL) AC_SUBST(EXT_LIB) AC_SUBST(EXT_OBJ) # set CFLAGS for tests below CFLAGS="$CFLAGS $CURLCFLAGS" AC_CHECK_HEADERS([curl/curl.h],[],[AC_MSG_ERROR([libcurl header file missing])]) AC_CHECK_DECLS([CURLMOPT_TIMERFUNCTION, CURLMOPT_TIMERDATA, CURLMOPT_SOCKETFUNCTION, CURLMOPT_SOCKETDATA], [], [AC_MSG_ERROR([multi API is too old, need libcurl >= 7.16.0])], [ #include "curl/curl.h" ]) AC_CHECK_DECLS([ CURLOPT_FILE, CURLOPT_URL, CURLOPT_PORT, CURLOPT_PROXY, CURLOPT_USERPWD, CURLOPT_PROXYUSERPWD, CURLOPT_RANGE, CURLOPT_INFILE, CURLOPT_ERRORBUFFER, CURLOPT_WRITEFUNCTION, CURLOPT_READFUNCTION, CURLOPT_TIMEOUT, CURLOPT_INFILESIZE, CURLOPT_POSTFIELDS, CURLOPT_REFERER, CURLOPT_FTPPORT, CURLOPT_USERAGENT, CURLOPT_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_TIME, CURLOPT_RESUME_FROM, CURLOPT_COOKIE, CURLOPT_HTTPHEADER, CURLOPT_HTTPPOST, CURLOPT_SSLCERT, CURLOPT_SSLCERTPASSWD, CURLOPT_SSLKEYPASSWD, CURLOPT_CRLF, CURLOPT_QUOTE, CURLOPT_WRITEHEADER, CURLOPT_COOKIEFILE, CURLOPT_SSLVERSION, CURLOPT_TIMECONDITION, CURLOPT_TIMEVALUE, CURLOPT_CUSTOMREQUEST, CURLOPT_POSTQUOTE, CURLOPT_WRITEINFO, CURLOPT_VERBOSE, CURLOPT_HEADER, CURLOPT_NOPROGRESS, CURLOPT_NOBODY, CURLOPT_FAILONERROR, CURLOPT_UPLOAD, CURLOPT_POST, CURLOPT_FTPLISTONLY, CURLOPT_FTPAPPEND, CURLOPT_NETRC, CURLOPT_FOLLOWLOCATION, CURLOPT_TRANSFERTEXT, CURLOPT_PUT, CURLOPT_PROGRESSFUNCTION, CURLOPT_PROGRESSDATA, CURLOPT_AUTOREFERER, CURLOPT_PROXYPORT, CURLOPT_POSTFIELDSIZE, CURLOPT_HTTPPROXYTUNNEL, CURLOPT_INTERFACE, CURLOPT_KRB4LEVEL, CURLOPT_SSL_VERIFYPEER, CURLOPT_CAINFO, CURLOPT_MAXREDIRS, CURLOPT_FILETIME, CURLOPT_TELNETOPTIONS, CURLOPT_MAXCONNECTS, CURLOPT_CLOSEPOLICY, CURLOPT_FRESH_CONNECT, CURLOPT_FORBID_REUSE, CURLOPT_RANDOM_FILE, CURLOPT_EGDSOCKET, CURLOPT_CONNECTTIMEOUT, CURLOPT_HEADERFUNCTION, CURLOPT_HTTPGET, CURLOPT_SSL_VERIFYHOST, CURLOPT_COOKIEJAR, CURLOPT_SSL_CIPHER_LIST, CURLOPT_HTTP_VERSION, CURLOPT_FTP_USE_EPSV, CURLOPT_SSLCERTTYPE, CURLOPT_SSLKEY, CURLOPT_SSLKEYTYPE, CURLOPT_SSLENGINE, CURLOPT_SSLENGINE_DEFAULT, CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPT_DNS_CACHE_TIMEOUT, CURLOPT_PREQUOTE, CURLOPT_DEBUGFUNCTION, CURLOPT_DEBUGDATA, CURLOPT_COOKIESESSION, CURLOPT_CAPATH, CURLOPT_BUFFERSIZE, CURLOPT_NOSIGNAL, CURLOPT_SHARE, CURLOPT_PROXYTYPE, CURLOPT_ENCODING, CURLOPT_HTTP200ALIASES, CURLOPT_UNRESTRICTED_AUTH, CURLOPT_FTP_USE_EPRT, CURLOPT_HTTPAUTH, CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPT_PROXYAUTH, CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_IPRESOLVE, CURLOPT_MAXFILESIZE, CURLOPT_INFILESIZE_LARGE, CURLOPT_RESUME_FROM_LARGE, CURLOPT_MAXFILESIZE_LARGE, CURLOPT_NETRC_FILE, CURLOPT_FTP_SSL, CURLOPT_POSTFIELDSIZE_LARGE, CURLOPT_TCP_NODELAY, CURLOPT_FTPSSLAUTH, CURLOPT_IOCTLFUNCTION, CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST, CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPT_FTP_SKIP_PASV_IP, CURLOPT_FTP_FILEMETHOD, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE, CURLOPT_CONNECT_ONLY, CURLOPT_MAX_SEND_SPEED_LARGE, CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_SSL_SESSIONID_CACHE, CURLOPT_SSH_AUTH_TYPES, CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPT_FTP_SSL_CCC, CURLOPT_TIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS, CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_HTTP_CONTENT_DECODING, CURLOPT_NEW_FILE_PERMS, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_POST301, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPT_COPYPOSTFIELDS, CURLOPT_PROXY_TRANSFER_MODE, CURLOPT_SEEKFUNCTION, CURLOPT_OPENSOCKETFUNCTION, CURLOPT_PROTOCOLS, CURLOPT_REDIR_PROTOCOLS, CURLOPT_RESOLVE, CURLOPT_DNS_SERVERS, CURLOPT_MAIL_FROM, CURLOPT_MAIL_RCPT, CURLOPT_PIPEWAIT, CURLOPT_CERTINFO, CURLOPT_USERNAME, CURLOPT_PASSWORD, CURLOPT_LOGIN_OPTIONS, CURLOPT_CONNECT_TO, CURLOPT_POSTREDIR, CURLOPT_MIMEPOST, CURLINFO_EFFECTIVE_URL, CURLINFO_RESPONSE_CODE, CURLINFO_TOTAL_TIME, CURLINFO_NAMELOOKUP_TIME, CURLINFO_CONNECT_TIME, CURLINFO_PRETRANSFER_TIME, CURLINFO_SIZE_UPLOAD, CURLINFO_SIZE_DOWNLOAD, CURLINFO_SPEED_DOWNLOAD, CURLINFO_SPEED_UPLOAD, CURLINFO_HEADER_SIZE, CURLINFO_REQUEST_SIZE, CURLINFO_SSL_VERIFYRESULT, CURLINFO_FILETIME, CURLINFO_CONTENT_LENGTH_DOWNLOAD, CURLINFO_CONTENT_LENGTH_UPLOAD, CURLINFO_STARTTRANSFER_TIME, CURLINFO_CONTENT_TYPE, CURLINFO_REDIRECT_TIME, CURLINFO_REDIRECT_COUNT, CURLINFO_HTTP_CONNECTCODE, CURLINFO_HTTPAUTH_AVAIL, CURLINFO_PROXYAUTH_AVAIL, CURLINFO_OS_ERRNO, CURLINFO_NUM_CONNECTS, CURLINFO_SSL_ENGINES, CURLINFO_COOKIELIST, CURLINFO_LASTSOCKET, CURLINFO_FTP_ENTRY_PATH, CURLINFO_REDIRECT_URL, CURLINFO_PRIMARY_IP, CURLINFO_LOCAL_IP, CURLINFO_LOCAL_PORT, CURLINFO_CONDITION_UNMET, CURLINFO_CERTINFO, CURLE_UNSUPPORTED_PROTOCOL, CURLE_FAILED_INIT, CURLE_URL_MALFORMAT, CURLE_URL_MALFORMAT_USER, CURLE_COULDNT_RESOLVE_PROXY, CURLE_COULDNT_RESOLVE_HOST, CURLE_COULDNT_CONNECT, CURLE_FTP_WEIRD_SERVER_REPLY, CURLE_FTP_ACCESS_DENIED, CURLE_FTP_USER_PASSWORD_INCORRECT, CURLE_FTP_WEIRD_PASS_REPLY, CURLE_FTP_WEIRD_USER_REPLY, CURLE_FTP_WEIRD_PASV_REPLY, CURLE_FTP_WEIRD_227_FORMAT, CURLE_FTP_CANT_GET_HOST, CURLE_FTP_CANT_RECONNECT, CURLE_FTP_COULDNT_SET_BINARY, CURLE_PARTIAL_FILE, CURLE_FTP_COULDNT_RETR_FILE, CURLE_FTP_WRITE_ERROR, CURLE_FTP_QUOTE_ERROR, CURLE_HTTP_RETURNED_ERROR, CURLE_WRITE_ERROR, CURLE_MALFORMAT_USER, CURLE_FTP_COULDNT_STOR_FILE, CURLE_READ_ERROR, CURLE_OUT_OF_MEMORY, CURLE_OPERATION_TIMEOUTED, CURLE_FTP_COULDNT_SET_ASCII, CURLE_FTP_PORT_FAILED, CURLE_FTP_COULDNT_USE_REST, CURLE_FTP_COULDNT_GET_SIZE, CURLE_HTTP_RANGE_ERROR, CURLE_HTTP_POST_ERROR, CURLE_SSL_CONNECT_ERROR, CURLE_BAD_DOWNLOAD_RESUME, CURLE_FILE_COULDNT_READ_FILE, CURLE_LDAP_CANNOT_BIND, CURLE_LDAP_SEARCH_FAILED, CURLE_LIBRARY_NOT_FOUND, CURLE_FUNCTION_NOT_FOUND, CURLE_ABORTED_BY_CALLBACK, CURLE_BAD_FUNCTION_ARGUMENT, CURLE_BAD_CALLING_ORDER, CURLE_INTERFACE_FAILED, CURLE_BAD_PASSWORD_ENTERED, CURLE_TOO_MANY_REDIRECTS, CURLE_UNKNOWN_TELNET_OPTION, CURLE_TELNET_OPTION_SYNTAX, CURLE_SSL_PEER_CERTIFICATE, CURLE_GOT_NOTHING, CURLE_SSL_ENGINE_NOTFOUND, CURLE_SSL_ENGINE_SETFAILED, CURLE_SEND_ERROR, CURLE_RECV_ERROR, CURLE_SHARE_IN_USE, CURLE_SSL_CERTPROBLEM, CURLE_SSL_CIPHER, CURLE_SSL_CACERT, CURLE_BAD_CONTENT_ENCODING, CURLE_LDAP_INVALID_URL, CURLE_FILESIZE_EXCEEDED, CURLE_FTP_SSL_FAILED, CURLE_SEND_FAIL_REWIND, CURLE_SSL_ENGINE_INITFAILED, CURLE_LOGIN_DENIED, CURLE_TFTP_NOTFOUND, CURLE_TFTP_PERM, CURLE_REMOTE_DISK_FULL, CURLE_TFTP_ILLEGAL, CURLE_TFTP_UNKNOWNID, CURLE_REMOTE_FILE_EXISTS, CURLE_TFTP_NOSUCHUSER, CURLE_CONV_FAILED, CURLE_CONV_REQD, CURLE_SSL_CACERT_BADFILE, CURLE_REMOTE_FILE_NOT_FOUND, CURLE_SSH, CURLE_SSL_SHUTDOWN_FAILED, CURLE_AGAIN, CURLMOPT_MAXCONNECTS, CURLMOPT_PIPELINING, CURLMOPT_MAX_PIPELINE_LENGTH, CURLMOPT_MAX_HOST_CONNECTIONS, CURL_SSLVERSION_TLSv1_0, CURL_SSLVERSION_TLSv1_1, CURL_SSLVERSION_TLSv1_2, CURL_SSLVERSION_TLSv1_3, CURL_HTTP_VERSION_2, CURL_HTTP_VERSION_2_0, CURL_HTTP_VERSION_2TLS, CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, CURL_VERSION_TLSAUTH_SRP, CURL_VERSION_NTLM_WB], [], [], [ #include "curl/curl.h" ]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([Makefile examples/Makefile]) AC_OUTPUT ocurl-0.9.0/curl-helper.c000066400000000000000000003417631356304035200152510ustar00rootroot00000000000000/*** *** curl-helper.c *** *** Copyright (c) 2003-2008, Lars Nilsson, *** Copyright (c) 2009, ygrek, ***/ #include #include #include #include #include #ifdef HAS_UNISTD #include #endif /* suppress false gcc warning on seekFunction */ #define CURL_DISABLE_TYPECHECK #include #ifndef CAML_NAME_SPACE #define CAML_NAME_SPACE #endif #include #include #include #include #include #include #include #include #ifndef CAMLdrop #define CAMLdrop caml_local_roots = caml__frame #endif #ifdef HAVE_CONFIG_H #include "config.h" #else #pragma message("No config file given.") #endif #ifdef __cplusplus extern "C" { #endif #define Val_none Val_int(0) static __inline value Val_some( value v ) { CAMLparam1( v ); CAMLlocal1( some ); some = caml_alloc(1, 0); Store_field( some, 0, v ); CAMLreturn( some ); } static value Val_pair(value v1, value v2) { CAMLparam2(v1,v2); CAMLlocal1(pair); pair = caml_alloc_small(2,0); Field(pair,0) = v1; Field(pair,1) = v2; CAMLreturn(pair); } static value Val_cons(value list, value v) { return Val_pair(v,list); } typedef struct Connection Connection; typedef struct ConnectionList ConnectionList; #define Connection_val(v) (*(Connection**)Data_custom_val(v)) typedef enum OcamlValues { Ocaml_WRITEFUNCTION, Ocaml_READFUNCTION, Ocaml_HEADERFUNCTION, Ocaml_PROGRESSFUNCTION, Ocaml_DEBUGFUNCTION, Ocaml_IOCTLFUNCTION, Ocaml_SEEKFUNCTION, Ocaml_OPENSOCKETFUNCTION, Ocaml_SSH_KEYFUNCTION, Ocaml_ERRORBUFFER, Ocaml_PRIVATE, /* Not used, last for size */ OcamlValuesSize } OcamlValue; struct Connection { CURL *handle; value ocamlValues; size_t refcount; /* number of references to this structure */ char *curl_ERRORBUFFER; char *curl_POSTFIELDS; struct curl_slist *curl_HTTPHEADER; struct curl_slist *httpPostBuffers; struct curl_httppost *httpPostFirst; struct curl_httppost *httpPostLast; struct curl_slist *curl_RESOLVE; struct curl_slist *curl_QUOTE; struct curl_slist *curl_POSTQUOTE; struct curl_slist *curl_HTTP200ALIASES; struct curl_slist *curl_MAIL_RCPT; struct curl_slist *curl_CONNECT_TO; #if HAVE_DECL_CURLOPT_MIMEPOST curl_mime *curl_MIMEPOST; #endif }; typedef struct CURLErrorMapping CURLErrorMapping; struct CURLErrorMapping { char *name; CURLcode error; }; CURLErrorMapping errorMap[] = { {"CURLE_OK", CURLE_OK}, #if HAVE_DECL_CURLE_UNSUPPORTED_PROTOCOL {"CURLE_UNSUPPORTED_PROTOCOL", CURLE_UNSUPPORTED_PROTOCOL}, #else {"CURLE_UNSUPPORTED_PROTOCOL", -1}, #endif #if HAVE_DECL_CURLE_FAILED_INIT {"CURLE_FAILED_INIT", CURLE_FAILED_INIT}, #else {"CURLE_FAILED_INIT", -1}, #endif #if HAVE_DECL_CURLE_URL_MALFORMAT {"CURLE_URL_MALFORMAT", CURLE_URL_MALFORMAT}, #else {"CURLE_URL_MALFORMAT", -1}, #endif #if HAVE_DECL_CURLE_URL_MALFORMAT_USER {"CURLE_URL_MALFORMAT_USER", CURLE_URL_MALFORMAT_USER}, #else {"CURLE_URL_MALFORMAT_USER", -1}, #endif #if HAVE_DECL_CURLE_COULDNT_RESOLVE_PROXY {"CURLE_COULDNT_RESOLVE_PROXY", CURLE_COULDNT_RESOLVE_PROXY}, #else {"CURLE_COULDNT_RESOLVE_PROXY", -1}, #endif #if HAVE_DECL_CURLE_COULDNT_RESOLVE_HOST {"CURLE_COULDNT_RESOLVE_HOST", CURLE_COULDNT_RESOLVE_HOST}, #else {"CURLE_COULDNT_RESOLVE_HOST", -1}, #endif #if HAVE_DECL_CURLE_COULDNT_CONNECT {"CURLE_COULDNT_CONNECT", CURLE_COULDNT_CONNECT}, #else {"CURLE_COULDNT_CONNECT", -1}, #endif #if HAVE_DECL_CURLE_FTP_WEIRD_SERVER_REPLY {"CURLE_FTP_WEIRD_SERVER_REPLY", CURLE_FTP_WEIRD_SERVER_REPLY}, #else {"CURLE_FTP_WEIRD_SERVER_REPLY", -1}, #endif #if HAVE_DECL_CURLE_FTP_ACCESS_DENIED {"CURLE_FTP_ACCESS_DENIED", CURLE_FTP_ACCESS_DENIED}, #else {"CURLE_FTP_ACCESS_DENIED", -1}, #endif #if HAVE_DECL_CURLE_FTP_USER_PASSWORD_INCORRECT {"CURLE_FTP_USER_PASSWORD_INCORRECT", CURLE_FTP_USER_PASSWORD_INCORRECT}, #else {"CURLE_FTP_USER_PASSWORD_INCORRECT", -1}, #endif #if HAVE_DECL_CURLE_FTP_WEIRD_PASS_REPLY {"CURLE_FTP_WEIRD_PASS_REPLY", CURLE_FTP_WEIRD_PASS_REPLY}, #else {"CURLE_FTP_WEIRD_PASS_REPLY", -1}, #endif #if HAVE_DECL_CURLE_FTP_WEIRD_USER_REPLY {"CURLE_FTP_WEIRD_USER_REPLY", CURLE_FTP_WEIRD_USER_REPLY}, #else {"CURLE_FTP_WEIRD_USER_REPLY", -1}, #endif #if HAVE_DECL_CURLE_FTP_WEIRD_PASV_REPLY {"CURLE_FTP_WEIRD_PASV_REPLY", CURLE_FTP_WEIRD_PASV_REPLY}, #else {"CURLE_FTP_WEIRD_PASV_REPLY", -1}, #endif #if HAVE_DECL_CURLE_FTP_WEIRD_227_FORMAT {"CURLE_FTP_WEIRD_227_FORMAT", CURLE_FTP_WEIRD_227_FORMAT}, #else {"CURLE_FTP_WEIRD_227_FORMAT", -1}, #endif #if HAVE_DECL_CURLE_FTP_CANT_GET_HOST {"CURLE_FTP_CANT_GET_HOST", CURLE_FTP_CANT_GET_HOST}, #else {"CURLE_FTP_CANT_GET_HOST", -1}, #endif #if HAVE_DECL_CURLE_FTP_CANT_RECONNECT {"CURLE_FTP_CANT_RECONNECT", CURLE_FTP_CANT_RECONNECT}, #else {"CURLE_FTP_CANT_RECONNECT", -1}, #endif #if HAVE_DECL_CURLE_FTP_COULDNT_SET_BINARY {"CURLE_FTP_COULDNT_SET_BINARY", CURLE_FTP_COULDNT_SET_BINARY}, #else {"CURLE_FTP_COULDNT_SET_BINARY", -1}, #endif #if HAVE_DECL_CURLE_PARTIAL_FILE {"CURLE_PARTIAL_FILE", CURLE_PARTIAL_FILE}, #else {"CURLE_PARTIAL_FILE", -1}, #endif #if HAVE_DECL_CURLE_FTP_COULDNT_RETR_FILE {"CURLE_FTP_COULDNT_RETR_FILE", CURLE_FTP_COULDNT_RETR_FILE}, #else {"CURLE_FTP_COULDNT_RETR_FILE", -1}, #endif #if HAVE_DECL_CURLE_FTP_WRITE_ERROR {"CURLE_FTP_WRITE_ERROR", CURLE_FTP_WRITE_ERROR}, #else {"CURLE_FTP_WRITE_ERROR", -1}, #endif #if HAVE_DECL_CURLE_FTP_QUOTE_ERROR {"CURLE_FTP_QUOTE_ERROR", CURLE_FTP_QUOTE_ERROR}, #else {"CURLE_FTP_QUOTE_ERROR", -1}, #endif #if HAVE_DECL_CURLE_HTTP_RETURNED_ERROR {"CURLE_HTTP_RETURNED_ERROR", CURLE_HTTP_RETURNED_ERROR}, #else {"CURLE_HTTP_RETURNED_ERROR", -1}, #endif #if HAVE_DECL_CURLE_WRITE_ERROR {"CURLE_WRITE_ERROR", CURLE_WRITE_ERROR}, #else {"CURLE_WRITE_ERROR", -1}, #endif #if HAVE_DECL_CURLE_MALFORMAT_USER {"CURLE_MALFORMAT_USER", CURLE_MALFORMAT_USER}, #else {"CURLE_MALFORMAT_USER", -1}, #endif #if HAVE_DECL_CURLE_FTP_COULDNT_STOR_FILE {"CURLE_FTP_COULDNT_STOR_FILE", CURLE_FTP_COULDNT_STOR_FILE}, #else {"CURLE_FTP_COULDNT_STOR_FILE", -1}, #endif #if HAVE_DECL_CURLE_READ_ERROR {"CURLE_READ_ERROR", CURLE_READ_ERROR}, #else {"CURLE_READ_ERROR", -1}, #endif #if HAVE_DECL_CURLE_OUT_OF_MEMORY {"CURLE_OUT_OF_MEMORY", CURLE_OUT_OF_MEMORY}, #else {"CURLE_OUT_OF_MEMORY", -1}, #endif #if HAVE_DECL_CURLE_OPERATION_TIMEOUTED {"CURLE_OPERATION_TIMEOUTED", CURLE_OPERATION_TIMEOUTED}, #else {"CURLE_OPERATION_TIMEOUTED", -1}, #endif #if HAVE_DECL_CURLE_FTP_COULDNT_SET_ASCII {"CURLE_FTP_COULDNT_SET_ASCII", CURLE_FTP_COULDNT_SET_ASCII}, #else {"CURLE_FTP_COULDNT_SET_ASCII", -1}, #endif #if HAVE_DECL_CURLE_FTP_PORT_FAILED {"CURLE_FTP_PORT_FAILED", CURLE_FTP_PORT_FAILED}, #else {"CURLE_FTP_PORT_FAILED", -1}, #endif #if HAVE_DECL_CURLE_FTP_COULDNT_USE_REST {"CURLE_FTP_COULDNT_USE_REST", CURLE_FTP_COULDNT_USE_REST}, #else {"CURLE_FTP_COULDNT_USE_REST", -1}, #endif #if HAVE_DECL_CURLE_FTP_COULDNT_GET_SIZE {"CURLE_FTP_COULDNT_GET_SIZE", CURLE_FTP_COULDNT_GET_SIZE}, #else {"CURLE_FTP_COULDNT_GET_SIZE", -1}, #endif #if HAVE_DECL_CURLE_HTTP_RANGE_ERROR {"CURLE_HTTP_RANGE_ERROR", CURLE_HTTP_RANGE_ERROR}, #else {"CURLE_HTTP_RANGE_ERROR", -1}, #endif #if HAVE_DECL_CURLE_HTTP_POST_ERROR {"CURLE_HTTP_POST_ERROR", CURLE_HTTP_POST_ERROR}, #else {"CURLE_HTTP_POST_ERROR", -1}, #endif #if HAVE_DECL_CURLE_SSL_CONNECT_ERROR {"CURLE_SSL_CONNECT_ERROR", CURLE_SSL_CONNECT_ERROR}, #else {"CURLE_SSL_CONNECT_ERROR", -1}, #endif #if HAVE_DECL_CURLE_BAD_DOWNLOAD_RESUME {"CURLE_BAD_DOWNLOAD_RESUME", CURLE_BAD_DOWNLOAD_RESUME}, #else {"CURLE_BAD_DOWNLOAD_RESUME", -1}, #endif #if HAVE_DECL_CURLE_FILE_COULDNT_READ_FILE {"CURLE_FILE_COULDNT_READ_FILE", CURLE_FILE_COULDNT_READ_FILE}, #else {"CURLE_FILE_COULDNT_READ_FILE", -1}, #endif #if HAVE_DECL_CURLE_LDAP_CANNOT_BIND {"CURLE_LDAP_CANNOT_BIND", CURLE_LDAP_CANNOT_BIND}, #else {"CURLE_LDAP_CANNOT_BIND", -1}, #endif #if HAVE_DECL_CURLE_LDAP_SEARCH_FAILED {"CURLE_LDAP_SEARCH_FAILED", CURLE_LDAP_SEARCH_FAILED}, #else {"CURLE_LDAP_SEARCH_FAILED", -1}, #endif #if HAVE_DECL_CURLE_LIBRARY_NOT_FOUND {"CURLE_LIBRARY_NOT_FOUND", CURLE_LIBRARY_NOT_FOUND}, #else {"CURLE_LIBRARY_NOT_FOUND", -1}, #endif #if HAVE_DECL_CURLE_FUNCTION_NOT_FOUND {"CURLE_FUNCTION_NOT_FOUND", CURLE_FUNCTION_NOT_FOUND}, #else {"CURLE_FUNCTION_NOT_FOUND", -1}, #endif #if HAVE_DECL_CURLE_ABORTED_BY_CALLBACK {"CURLE_ABORTED_BY_CALLBACK", CURLE_ABORTED_BY_CALLBACK}, #else {"CURLE_ABORTED_BY_CALLBACK", -1}, #endif #if HAVE_DECL_CURLE_BAD_FUNCTION_ARGUMENT {"CURLE_BAD_FUNCTION_ARGUMENT", CURLE_BAD_FUNCTION_ARGUMENT}, #else {"CURLE_BAD_FUNCTION_ARGUMENT", -1}, #endif #if HAVE_DECL_CURLE_BAD_CALLING_ORDER {"CURLE_BAD_CALLING_ORDER", CURLE_BAD_CALLING_ORDER}, #else {"CURLE_BAD_CALLING_ORDER", -1}, #endif #if HAVE_DECL_CURLE_INTERFACE_FAILED {"CURLE_INTERFACE_FAILED", CURLE_INTERFACE_FAILED}, #else {"CURLE_INTERFACE_FAILED", -1}, #endif #if HAVE_DECL_CURLE_BAD_PASSWORD_ENTERED {"CURLE_BAD_PASSWORD_ENTERED", CURLE_BAD_PASSWORD_ENTERED}, #else {"CURLE_BAD_PASSWORD_ENTERED", -1}, #endif #if HAVE_DECL_CURLE_TOO_MANY_REDIRECTS {"CURLE_TOO_MANY_REDIRECTS", CURLE_TOO_MANY_REDIRECTS}, #else {"CURLE_TOO_MANY_REDIRECTS", -1}, #endif #if HAVE_DECL_CURLE_UNKNOWN_TELNET_OPTION {"CURLE_UNKNOWN_TELNET_OPTION", CURLE_UNKNOWN_TELNET_OPTION}, #else {"CURLE_UNKNOWN_TELNET_OPTION", -1}, #endif #if HAVE_DECL_CURLE_TELNET_OPTION_SYNTAX {"CURLE_TELNET_OPTION_SYNTAX", CURLE_TELNET_OPTION_SYNTAX}, #else {"CURLE_TELNET_OPTION_SYNTAX", -1}, #endif #if HAVE_DECL_CURLE_SSL_PEER_CERTIFICATE {"CURLE_SSL_PEER_CERTIFICATE", CURLE_SSL_PEER_CERTIFICATE}, #else {"CURLE_SSL_PEER_CERTIFICATE", -1}, #endif #if HAVE_DECL_CURLE_GOT_NOTHING {"CURLE_GOT_NOTHING", CURLE_GOT_NOTHING}, #else {"CURLE_GOT_NOTHING", -1}, #endif #if HAVE_DECL_CURLE_SSL_ENGINE_NOTFOUND {"CURLE_SSL_ENGINE_NOTFOUND", CURLE_SSL_ENGINE_NOTFOUND}, #else {"CURLE_SSL_ENGINE_NOTFOUND", -1}, #endif #if HAVE_DECL_CURLE_SSL_ENGINE_SETFAILED {"CURLE_SSL_ENGINE_SETFAILED", CURLE_SSL_ENGINE_SETFAILED}, #else {"CURLE_SSL_ENGINE_SETFAILED", -1}, #endif #if HAVE_DECL_CURLE_SEND_ERROR {"CURLE_SEND_ERROR", CURLE_SEND_ERROR}, #else {"CURLE_SEND_ERROR", -1}, #endif #if HAVE_DECL_CURLE_RECV_ERROR {"CURLE_RECV_ERROR", CURLE_RECV_ERROR}, #else {"CURLE_RECV_ERROR", -1}, #endif #if HAVE_DECL_CURLE_SHARE_IN_USE {"CURLE_SHARE_IN_USE", CURLE_SHARE_IN_USE}, #else {"CURLE_SHARE_IN_USE", -1}, #endif #if HAVE_DECL_CURLE_SSL_CERTPROBLEM {"CURLE_SSL_CERTPROBLEM", CURLE_SSL_CERTPROBLEM}, #else {"CURLE_SSL_CERTPROBLEM", -1}, #endif #if HAVE_DECL_CURLE_SSL_CIPHER {"CURLE_SSL_CIPHER", CURLE_SSL_CIPHER}, #else {"CURLE_SSL_CIPHER", -1}, #endif #if HAVE_DECL_CURLE_SSL_CACERT {"CURLE_SSL_CACERT", CURLE_SSL_CACERT}, #else {"CURLE_SSL_CACERT", -1}, #endif #if HAVE_DECL_CURLE_BAD_CONTENT_ENCODING {"CURLE_BAD_CONTENT_ENCODING", CURLE_BAD_CONTENT_ENCODING}, #else {"CURLE_BAD_CONTENT_ENCODING", -1}, #endif #if HAVE_DECL_CURLE_LDAP_INVALID_URL {"CURLE_LDAP_INVALID_URL", CURLE_LDAP_INVALID_URL}, #else {"CURLE_LDAP_INVALID_URL", -1}, #endif #if HAVE_DECL_CURLE_FILESIZE_EXCEEDED {"CURLE_FILESIZE_EXCEEDED", CURLE_FILESIZE_EXCEEDED}, #else {"CURLE_FILESIZE_EXCEEDED", -1}, #endif #if HAVE_DECL_CURLE_FTP_SSL_FAILED {"CURLE_FTP_SSL_FAILED", CURLE_FTP_SSL_FAILED}, #else {"CURLE_FTP_SSL_FAILED", -1}, #endif #if HAVE_DECL_CURLE_SEND_FAIL_REWIND {"CURLE_SEND_FAIL_REWIND", CURLE_SEND_FAIL_REWIND}, #else {"CURLE_SEND_FAIL_REWIND", -1}, #endif #if HAVE_DECL_CURLE_SSL_ENGINE_INITFAILED {"CURLE_SSL_ENGINE_INITFAILED", CURLE_SSL_ENGINE_INITFAILED}, #else {"CURLE_SSL_ENGINE_INITFAILED", -1}, #endif #if HAVE_DECL_CURLE_LOGIN_DENIED {"CURLE_LOGIN_DENIED", CURLE_LOGIN_DENIED}, #else {"CURLE_LOGIN_DENIED", -1}, #endif #if HAVE_DECL_CURLE_TFTP_NOTFOUND {"CURLE_TFTP_NOTFOUND", CURLE_TFTP_NOTFOUND}, #else {"CURLE_TFTP_NOTFOUND", -1}, #endif #if HAVE_DECL_CURLE_TFTP_PERM {"CURLE_TFTP_PERM", CURLE_TFTP_PERM}, #else {"CURLE_TFTP_PERM", -1}, #endif #if HAVE_DECL_CURLE_REMOTE_DISK_FULL {"CURLE_REMOTE_DISK_FULL", CURLE_REMOTE_DISK_FULL}, #else {"CURLE_REMOTE_DISK_FULL", -1}, #endif #if HAVE_DECL_CURLE_TFTP_ILLEGAL {"CURLE_TFTP_ILLEGAL", CURLE_TFTP_ILLEGAL}, #else {"CURLE_TFTP_ILLEGAL", -1}, #endif #if HAVE_DECL_CURLE_TFTP_UNKNOWNID {"CURLE_TFTP_UNKNOWNID", CURLE_TFTP_UNKNOWNID}, #else {"CURLE_TFTP_UNKNOWNID", -1}, #endif #if HAVE_DECL_CURLE_REMOTE_FILE_EXISTS {"CURLE_REMOTE_FILE_EXISTS", CURLE_REMOTE_FILE_EXISTS}, #else {"CURLE_REMOTE_FILE_EXISTS", -1}, #endif #if HAVE_DECL_CURLE_TFTP_NOSUCHUSER {"CURLE_TFTP_NOSUCHUSER", CURLE_TFTP_NOSUCHUSER}, #else {"CURLE_TFTP_NOSUCHUSER", -1}, #endif #if HAVE_DECL_CURLE_CONV_FAILED {"CURLE_CONV_FAILED", CURLE_CONV_FAILED}, #else {"CURLE_CONV_FAILED", -1}, #endif #if HAVE_DECL_CURLE_CONV_REQD {"CURLE_CONV_REQD", CURLE_CONV_REQD}, #else {"CURLE_CONV_REQD", -1}, #endif #if HAVE_DECL_CURLE_SSL_CACERT_BADFILE {"CURLE_SSL_CACERT_BADFILE", CURLE_SSL_CACERT_BADFILE}, #else {"CURLE_SSL_CACERT_BADFILE", -1}, #endif #if HAVE_DECL_CURLE_REMOTE_FILE_NOT_FOUND {"CURLE_REMOTE_FILE_NOT_FOUND", CURLE_REMOTE_FILE_NOT_FOUND}, #else {"CURLE_REMOTE_FILE_NOT_FOUND", -1}, #endif #if HAVE_DECL_CURLE_SSH {"CURLE_SSH", CURLE_SSH}, #else {"CURLE_SSH", -1}, #endif #if HAVE_DECL_CURLE_SSL_SHUTDOWN_FAILED {"CURLE_SSL_SHUTDOWN_FAILED", CURLE_SSL_SHUTDOWN_FAILED}, #else {"CURLE_SSL_SHUTDOWN_FAILED", -1}, #endif #if HAVE_DECL_CURLE_AGAIN {"CURLE_AGAIN", CURLE_AGAIN}, #else {"CURLE_AGAIN", -1}, #endif {NULL, (CURLcode)0} }; typedef struct CURLOptionMapping CURLOptionMapping; struct CURLOptionMapping { void (*optionHandler)(Connection *, value); char *name; }; static char* strdup_ml(value v) { char* p = NULL; p = (char*)malloc(caml_string_length(v)+1); memcpy(p,String_val(v),caml_string_length(v)+1); // caml strings have terminating zero return p; } static value ml_copy_string(char const* p, size_t size) { value v = caml_alloc_string(size); memcpy(&Byte(v,0),p,size); return v; } /* prepends to the beginning of list */ static struct curl_slist* curl_slist_prepend_ml(struct curl_slist* list, value v) { /* FIXME check NULLs */ struct curl_slist* new_item = (struct curl_slist*)malloc(sizeof(struct curl_slist)); new_item->next = list; new_item->data = strdup_ml(v); return new_item; } static void free_curl_slist(struct curl_slist *slist) { if (NULL == slist) return; curl_slist_free_all(slist); } static void raiseError(Connection *conn, CURLcode code) { CAMLparam0(); CAMLlocal1(exceptionData); const value *exception; char *errorString = "Unknown Error"; int i; for (i = 0; errorMap[i].name != NULL; i++) { if (errorMap[i].error == code) { errorString = errorMap[i].name; break; } } exceptionData = caml_alloc_tuple(3); Store_field(exceptionData, 0, Val_int(code)); Store_field(exceptionData, 1, Val_int(code)); Store_field(exceptionData, 2, caml_copy_string(errorString)); if (conn != NULL && conn->curl_ERRORBUFFER != NULL) { Store_field(Field(conn->ocamlValues, Ocaml_ERRORBUFFER), 0, caml_copy_string(conn->curl_ERRORBUFFER)); } exception = caml_named_value("CurlException"); if (exception == NULL) caml_failwith("CurlException not registered"); caml_raise_with_arg(*exception, exceptionData); CAMLreturn0; } static void resetOcamlValues(Connection* connection) { int i; for (i = 0; i < OcamlValuesSize; i++) Store_field(connection->ocamlValues, i, Val_unit); } static Connection* allocConnection(CURL* h) { Connection* connection = (Connection *)malloc(sizeof(Connection)); connection->ocamlValues = caml_alloc(OcamlValuesSize, 0); resetOcamlValues(connection); caml_register_global_root(&connection->ocamlValues); connection->handle = h; curl_easy_setopt(h, CURLOPT_PRIVATE, connection); connection->refcount = 0; connection->curl_ERRORBUFFER = NULL; connection->curl_POSTFIELDS = NULL; connection->curl_HTTPHEADER = NULL; connection->httpPostBuffers = NULL; connection->httpPostFirst = NULL; connection->httpPostLast = NULL; connection->curl_QUOTE = NULL; connection->curl_POSTQUOTE = NULL; connection->curl_HTTP200ALIASES = NULL; connection->curl_RESOLVE = NULL; connection->curl_MAIL_RCPT = NULL; connection->curl_CONNECT_TO = NULL; #if HAVE_DECL_CURLOPT_MIMEPOST connection->curl_MIMEPOST = NULL; #endif return connection; } static Connection *newConnection(void) { CURL* h; caml_enter_blocking_section(); h = curl_easy_init(); caml_leave_blocking_section(); return allocConnection(h); } static void free_if(void* p) { if (NULL != p) free(p); } static void removeConnection(Connection *connection, int finalization) { const char* fin_url = NULL; if (!connection->handle) { return; /* already cleaned up */ } if (finalization) { /* cannot engage OCaml runtime at finalization, just report leak */ if (CURLE_OK != curl_easy_getinfo(connection->handle, CURLINFO_EFFECTIVE_URL, &fin_url) || NULL == fin_url) { fin_url = "unknown"; } fprintf(stderr,"Curl: handle %p leaked, conn %p, url %s\n", connection->handle, connection, fin_url); fflush(stderr); } else { caml_enter_blocking_section(); curl_easy_cleanup(connection->handle); caml_leave_blocking_section(); } connection->handle = NULL; caml_remove_global_root(&connection->ocamlValues); free_if(connection->curl_ERRORBUFFER); free_if(connection->curl_POSTFIELDS); free_curl_slist(connection->curl_HTTPHEADER); free_curl_slist(connection->httpPostBuffers); if (connection->httpPostFirst != NULL) curl_formfree(connection->httpPostFirst); free_curl_slist(connection->curl_RESOLVE); free_curl_slist(connection->curl_QUOTE); free_curl_slist(connection->curl_POSTQUOTE); free_curl_slist(connection->curl_HTTP200ALIASES); free_curl_slist(connection->curl_MAIL_RCPT); free_curl_slist(connection->curl_CONNECT_TO); #if HAVE_DECL_CURLOPT_MIMEPOST curl_mime_free(connection->curl_MIMEPOST); #endif } static Connection* getConnection(CURL* h) { Connection* p = NULL; if (CURLE_OK != curl_easy_getinfo(h, CURLINFO_PRIVATE, &p) || NULL == p) { caml_failwith("Unknown handle"); } return p; } #if 1 static void checkConnection(Connection * connection) { (void)connection; } #else static void checkConnection(Connection *connection) { if (connection != getConnection(connection->handle)) { caml_failwith("Invalid Connection"); } } #endif void op_curl_easy_finalize(value v) { Connection* conn = Connection_val(v); /* same connection may be referenced by several different OCaml values, see e.g. caml_curl_multi_remove_finished */ conn->refcount--; if (0 == conn->refcount) { removeConnection(conn, 1); free(conn); } } int op_curl_easy_compare(value v1, value v2) { size_t p1 = (size_t)Connection_val(v1); size_t p2 = (size_t)Connection_val(v2); return (p1 == p2 ? 0 : (p1 > p2 ? 1 : -1)); /* compare addresses */ } intnat op_curl_easy_hash(value v) { return (size_t)Connection_val(v); /* address */ } static struct custom_operations curl_easy_ops = { "ygrek.curl_easy", op_curl_easy_finalize, op_curl_easy_compare, op_curl_easy_hash, custom_serialize_default, custom_deserialize_default, #if defined(custom_compare_ext_default) custom_compare_ext_default, #endif }; value caml_curl_alloc(Connection* conn) { value v = caml_alloc_custom(&curl_easy_ops, sizeof(Connection*), 0, 1); Connection_val(v) = conn; conn->refcount++; return v; } static size_t cb_WRITEFUNCTION(char *ptr, size_t size, size_t nmemb, void *data) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal2(result, str); Connection *conn = (Connection *)data; checkConnection(conn); str = ml_copy_string(ptr,size*nmemb); result = caml_callback_exn(Field(conn->ocamlValues, Ocaml_WRITEFUNCTION), str); size_t r = Is_exception_result(result) ? 0 : Int_val(result); CAMLdrop; caml_enter_blocking_section(); return r; } static size_t cb_READFUNCTION(void *ptr, size_t size, size_t nmemb, void *data) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal1(result); Connection *conn = (Connection *)data; size_t length; checkConnection(conn); result = caml_callback_exn(Field(conn->ocamlValues, Ocaml_READFUNCTION), Val_int(size*nmemb)); if (Is_exception_result(result)) { CAMLreturnT(size_t,CURL_READFUNC_ABORT); } length = caml_string_length(result); size_t r; if (length <= size*nmemb) { memcpy(ptr, String_val(result), length); r = length; } else { r = CURL_READFUNC_ABORT; } CAMLdrop; caml_enter_blocking_section(); return r; } static size_t cb_HEADERFUNCTION(char *ptr, size_t size, size_t nmemb, void *data) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal2(result,str); Connection *conn = (Connection *)data; checkConnection(conn); str = ml_copy_string(ptr,size*nmemb); result = caml_callback_exn(Field(conn->ocamlValues, Ocaml_HEADERFUNCTION), str); size_t r = Is_exception_result(result) ? 0 : Int_val(result); CAMLdrop; caml_enter_blocking_section(); return r; } static int cb_PROGRESSFUNCTION(void *data, double dlTotal, double dlNow, double ulTotal, double ulNow) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal1(result); CAMLlocalN(callbackData, 4); Connection *conn = (Connection *)data; checkConnection(conn); callbackData[0] = caml_copy_double(dlTotal); callbackData[1] = caml_copy_double(dlNow); callbackData[2] = caml_copy_double(ulTotal); callbackData[3] = caml_copy_double(ulNow); result = caml_callbackN_exn(Field(conn->ocamlValues, Ocaml_PROGRESSFUNCTION), 4, callbackData); int r = Is_exception_result(result) ? 1 : Bool_val(result); CAMLdrop; caml_enter_blocking_section(); return r; } static int cb_DEBUGFUNCTION(CURL *debugConnection, curl_infotype infoType, char *buffer, size_t bufferLength, void *data) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal3(camlDebugConnection, camlInfoType, camlMessage); Connection *conn = (Connection *)data; (void)debugConnection; /* not used */ checkConnection(conn); camlDebugConnection = caml_curl_alloc(conn); camlMessage = ml_copy_string(buffer,bufferLength); camlInfoType = Val_long(infoType <= CURLINFO_SSL_DATA_OUT ? infoType : CURLINFO_END); caml_callback3_exn(Field(conn->ocamlValues, Ocaml_DEBUGFUNCTION), camlDebugConnection, camlInfoType, camlMessage); CAMLdrop; caml_enter_blocking_section(); return 0; } static curlioerr cb_IOCTLFUNCTION(CURL *ioctl, int cmd, void *data) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal3(camlResult, camlConnection, camlCmd); Connection *conn = (Connection *)data; curlioerr result = CURLIOE_OK; (void)ioctl; /* not used */ checkConnection(conn); if (cmd == CURLIOCMD_NOP) camlCmd = Val_long(0); else if (cmd == CURLIOCMD_RESTARTREAD) camlCmd = Val_long(1); else caml_failwith("Invalid IOCTL Cmd!"); camlConnection = caml_curl_alloc(conn); camlResult = caml_callback2_exn(Field(conn->ocamlValues, Ocaml_IOCTLFUNCTION), camlConnection, camlCmd); if (Is_exception_result(camlResult)) { result = CURLIOE_FAILRESTART; } else switch (Long_val(camlResult)) { case 0: /* CURLIOE_OK */ result = CURLIOE_OK; break; case 1: /* CURLIOE_UNKNOWNCMD */ result = CURLIOE_UNKNOWNCMD; break; case 2: /* CURLIOE_FAILRESTART */ result = CURLIOE_FAILRESTART; break; default: /* Incorrect return value, but let's handle it */ result = CURLIOE_FAILRESTART; break; } CAMLdrop; caml_enter_blocking_section(); return result; } #if HAVE_DECL_CURLOPT_SEEKFUNCTION static int cb_SEEKFUNCTION(void *data, curl_off_t offset, int origin) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal3(camlResult, camlOffset, camlOrigin); Connection *conn = (Connection *)data; camlOffset = caml_copy_int64(offset); if (origin == SEEK_SET) camlOrigin = Val_long(0); else if (origin == SEEK_CUR) camlOrigin = Val_long(1); else if (origin == SEEK_END) camlOrigin = Val_long(2); else caml_failwith("Invalid seek code"); camlResult = caml_callback2_exn(Field(conn->ocamlValues, Ocaml_SEEKFUNCTION), camlOffset, camlOrigin); int result; if (Is_exception_result(camlResult)) result = CURL_SEEKFUNC_FAIL; else switch (Int_val(camlResult)) { case 0: result = CURL_SEEKFUNC_OK; break; case 1: result = CURL_SEEKFUNC_FAIL; break; case 2: result = CURL_SEEKFUNC_CANTSEEK; break; default: caml_failwith("Invalid seek result"); } CAMLdrop; caml_enter_blocking_section(); return result; } #endif #if HAVE_DECL_CURLOPT_OPENSOCKETFUNCTION static int cb_OPENSOCKETFUNCTION(void *data, curlsocktype purpose, struct curl_sockaddr *addr) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal1(result); Connection *conn = (Connection *)data; int sock = -1; (void)purpose; /* not used */ sock = socket(addr->family, addr->socktype, addr->protocol); if (-1 != sock) { /* FIXME windows */ result = caml_callback_exn(Field(conn->ocamlValues, Ocaml_OPENSOCKETFUNCTION), Val_int(sock)); if (Is_exception_result(result)) { close(sock); sock = -1; } } CAMLdrop; caml_enter_blocking_section(); return ((sock == -1) ? CURL_SOCKET_BAD : sock); } #endif static int cb_SSH_KEYFUNCTION(CURL *easy, const struct curl_khkey *knownkey, const struct curl_khkey *foundkey, enum curl_khmatch match, void *clientp) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal3(v_found, v_match, v_result); Connection *conn = (Connection *)clientp; int res = CURLKHSTAT_REJECT; switch (match) { case CURLKHMATCH_OK: v_match = Val_int(0); break; case CURLKHMATCH_MISMATCH: v_match = caml_alloc_small(1, 0); Field(v_match, 0) = ml_copy_string(knownkey->key, knownkey->len ? knownkey->len : strlen(knownkey->key)); break; case CURLKHMATCH_MISSING: v_match = Val_int(1); break; default: caml_failwith("Invalid CURL_SSH_KEYFUNCTION argument"); break; } v_found = ml_copy_string(foundkey->key, foundkey->len ? foundkey->len : strlen(foundkey->key)); v_result = caml_callback2_exn(Field(conn->ocamlValues, Ocaml_SSH_KEYFUNCTION), v_match, v_found); if (!Is_exception_result(v_result)) { switch (Int_val(v_result)) { case 0: res = CURLKHSTAT_FINE_ADD_TO_FILE; break; case 1: res = CURLKHSTAT_FINE; break; case 2: res = CURLKHSTAT_REJECT; break; case 3: res = CURLKHSTAT_DEFER; break; default: caml_failwith("Invalid CURLOPT_SSH_KEYFUNCTION return value"); break; } } CAMLdrop; caml_enter_blocking_section(); return res; } /** ** curl_global_init helper function **/ value caml_curl_global_init(value initOption) { CAMLparam1(initOption); switch (Long_val(initOption)) { case 0: /* CURLINIT_GLOBALALL */ CAMLreturn(Val_long(curl_global_init(CURL_GLOBAL_ALL))); break; case 1: /* CURLINIT_GLOBALSSL */ CAMLreturn(Val_long(curl_global_init(CURL_GLOBAL_SSL))); break; case 2: /* CURLINIT_GLOBALWIN32 */ CAMLreturn(Val_long(curl_global_init(CURL_GLOBAL_WIN32))); break; case 3: /* CURLINIT_GLOBALNOTHING */ CAMLreturn(Val_long(curl_global_init(CURL_GLOBAL_NOTHING))); break; default: caml_failwith("Invalid Initialization Option"); break; } /* Keep compiler happy, we should never get here due to caml_failwith() */ CAMLreturn(Val_unit); } /** ** curl_global_cleanup helper function **/ value caml_curl_global_cleanup(void) { CAMLparam0(); curl_global_cleanup(); CAMLreturn(Val_unit); } /** ** curl_easy_init helper function **/ value caml_curl_easy_init(void) { CAMLparam0(); CAMLlocal1(result); result = caml_curl_alloc(newConnection()); CAMLreturn(result); } value caml_curl_easy_reset(value conn) { CAMLparam1(conn); Connection *connection = Connection_val(conn); checkConnection(connection); curl_easy_reset(connection->handle); curl_easy_setopt(connection->handle, CURLOPT_PRIVATE, connection); resetOcamlValues(connection); CAMLreturn(Val_unit); } /** ** curl_easy_setopt helper utility functions **/ #define SETOPT_FUNCTION(name) \ static void handle_##name##FUNCTION(Connection *conn, value option) \ { \ CAMLparam1(option); \ CURLcode result = CURLE_OK; \ Store_field(conn->ocamlValues, Ocaml_##name##FUNCTION, option); \ result = curl_easy_setopt(conn->handle, CURLOPT_##name##FUNCTION, cb_##name##FUNCTION); \ if (result != CURLE_OK) raiseError(conn, result); \ result = curl_easy_setopt(conn->handle, CURLOPT_##name##DATA, conn); \ if (result != CURLE_OK) raiseError(conn, result); \ CAMLreturn0; \ } SETOPT_FUNCTION( WRITE) SETOPT_FUNCTION( READ) SETOPT_FUNCTION( HEADER) SETOPT_FUNCTION( PROGRESS) SETOPT_FUNCTION( DEBUG) SETOPT_FUNCTION( SSH_KEY) #if HAVE_DECL_CURLOPT_SEEKFUNCTION SETOPT_FUNCTION( SEEK) #endif #if HAVE_DECL_CURLOPT_IOCTLFUNCTION SETOPT_FUNCTION( IOCTL) #endif #if HAVE_DECL_CURLOPT_OPENSOCKETFUNCTION SETOPT_FUNCTION( OPENSOCKET) #endif static void handle_slist(Connection *conn, struct curl_slist** slist, CURLoption curl_option, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; free_curl_slist(*slist); *slist = NULL; while (Val_emptylist != option) { *slist = curl_slist_append(*slist, String_val(Field(option, 0))); option = Field(option, 1); } result = curl_easy_setopt(conn->handle, curl_option, *slist); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } static long convert_bit_list(long *map, size_t map_size, value option) { CAMLparam1(option); long bits = 0; int index; while (Val_emptylist != option) { index = Int_val(Field(option, 0)); if ((index < 0) || ((size_t)index >= map_size)) caml_invalid_argument("convert_bit_list"); bits |= map[index]; option = Field(option, 1); } CAMLreturnT(long, bits); } #define SETOPT_STRING(name) \ static void handle_##name(Connection *conn, value option) \ { \ CAMLparam1(option); \ CURLcode result = CURLE_OK; \ \ result = curl_easy_setopt(conn->handle, CURLOPT_##name, String_val(option)); \ \ if (result != CURLE_OK) \ raiseError(conn, result); \ \ CAMLreturn0; \ } #define SETOPT_VAL_(func_name, curl_option, conv_val) \ static void func_name(Connection *conn, value option) \ { \ CAMLparam1(option); \ CURLcode result = CURLE_OK; \ \ result = curl_easy_setopt(conn->handle, curl_option, conv_val(option)); \ \ if (result != CURLE_OK) \ raiseError(conn, result); \ \ CAMLreturn0; \ } #define SETOPT_VAL(name, conv) SETOPT_VAL_(handle_##name, CURLOPT_##name, conv) #define SETOPT_BOOL(name) SETOPT_VAL(name, Bool_val) #define SETOPT_LONG(name) SETOPT_VAL(name, Long_val) #define SETOPT_INT64(name) SETOPT_VAL(name, Int64_val) #if HAVE_DECL_CURLOPT_MIMEPOST static void new_part(Connection* conn, curl_mime* mime, value v_part) { value v_encoding = Field(v_part, 0); value v_headers = Field(v_part, 1); value v_subparts = Field(v_part, 2); value v_data = Field(v_part, 3); value v_str = Field(v_data, 0); struct curl_slist *headers = NULL; CURLcode result; curl_mimepart *part = curl_mime_addpart(mime); switch (Int_val(v_encoding)) { case 0: result = curl_mime_encoder(part, "8bit"); break; case 1: result = curl_mime_encoder(part, "binary"); break; case 2: result = curl_mime_encoder(part, "7bit"); break; case 3: result = curl_mime_encoder(part, "quoted-printable"); break; case 4: result = curl_mime_encoder(part, "base64"); break; case 5: result = CURLE_OK; break; default: caml_failwith("Invalid MIMEPOST encoding value"); break; } if (result != CURLE_OK) { raiseError(conn, result); } while (v_headers != Val_emptylist) { headers = curl_slist_append(headers, String_val(Field(v_headers, 0))); v_headers = Field(v_headers, 1); } result = curl_mime_headers(part, headers, 1); if (result != CURLE_OK) { raiseError(conn, result); } switch (Tag_val(v_data)) { case 0: result = curl_mime_data(part, String_val(v_str), caml_string_length(v_str)); break; case 1: result = curl_mime_filedata(part, String_val(v_str)); break; default: caml_failwith("Invalid MIMEPOST data value"); break; } if (result != CURLE_OK) { raiseError(conn, result); } if (v_subparts != Val_emptylist) { curl_mime *mime = curl_mime_init(conn->handle); while (v_subparts != Val_emptylist) { new_part(conn, mime, Field(v_subparts, 0)); v_subparts = Field(v_subparts, 1); } result = curl_mime_subparts(part, mime); if (result != CURLE_OK) { raiseError(conn, result); } } } static void handle_MIMEPOST(Connection* conn, value v_subparts) { CAMLparam1(v_subparts); curl_mime *mime = curl_mime_init(conn->handle); CURLcode result; curl_mime_free(conn->curl_MIMEPOST); conn->curl_MIMEPOST = mime; while (v_subparts != Val_emptylist) { new_part(conn, mime, Field(v_subparts, 0)); v_subparts = Field(v_subparts, 1); } result = curl_easy_setopt(conn->handle, CURLOPT_MIMEPOST, mime); if (result != CURLE_OK) { raiseError(conn, result); } CAMLreturn0; } #endif #define SETOPT_SLIST(name) \ static void handle_##name(Connection* conn, value option) \ { \ handle_slist(conn,&(conn->curl_##name),CURLOPT_##name,option); \ } SETOPT_STRING( URL) SETOPT_LONG( INFILESIZE) SETOPT_STRING( PROXY) SETOPT_LONG( PROXYPORT) SETOPT_BOOL( HTTPPROXYTUNNEL) SETOPT_BOOL( VERBOSE) SETOPT_BOOL( HEADER) SETOPT_BOOL( NOPROGRESS) #if HAVE_DECL_CURLOPT_NOSIGNAL SETOPT_BOOL( NOSIGNAL) #endif SETOPT_BOOL( NOBODY) SETOPT_BOOL( FAILONERROR) SETOPT_BOOL( UPLOAD) SETOPT_BOOL( POST) SETOPT_BOOL( FTPLISTONLY) SETOPT_BOOL( FTPAPPEND) static void handle_NETRC(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; long netrc; switch (Long_val(option)) { case 0: /* CURL_NETRC_OPTIONAL */ netrc = CURL_NETRC_OPTIONAL; break; case 1:/* CURL_NETRC_IGNORED */ netrc = CURL_NETRC_IGNORED; break; case 2: /* CURL_NETRC_REQUIRED */ netrc = CURL_NETRC_REQUIRED; break; default: caml_failwith("Invalid NETRC Option"); break; } result = curl_easy_setopt(conn->handle, CURLOPT_NETRC, netrc); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #if HAVE_DECL_CURLOPT_ENCODING static void handle_ENCODING(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* CURL_ENCODING_NONE */ result = curl_easy_setopt(conn->handle, CURLOPT_ENCODING, "identity"); break; case 1: /* CURL_ENCODING_DEFLATE */ result = curl_easy_setopt(conn->handle, CURLOPT_ENCODING, "deflate"); break; case 2: /* CURL_ENCODING_GZIP */ result = curl_easy_setopt(conn->handle, CURLOPT_ENCODING, "gzip"); break; case 3: /* CURL_ENCODING_ANY */ result = curl_easy_setopt(conn->handle, CURLOPT_ENCODING, ""); break; default: caml_failwith("Invalid Encoding Option"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif SETOPT_BOOL( FOLLOWLOCATION) SETOPT_BOOL( TRANSFERTEXT) SETOPT_BOOL( PUT) SETOPT_STRING( USERPWD) SETOPT_STRING( PROXYUSERPWD) SETOPT_STRING( RANGE) static void handle_ERRORBUFFER(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; Store_field(conn->ocamlValues, Ocaml_ERRORBUFFER, option); if (conn->curl_ERRORBUFFER != NULL) free(conn->curl_ERRORBUFFER); conn->curl_ERRORBUFFER = (char*)malloc(sizeof(char) * CURL_ERROR_SIZE); result = curl_easy_setopt(conn->handle, CURLOPT_ERRORBUFFER, conn->curl_ERRORBUFFER); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_LONG( TIMEOUT) static void handle_POSTFIELDS(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; if (conn->curl_POSTFIELDS != NULL) free(conn->curl_POSTFIELDS); conn->curl_POSTFIELDS = strdup_ml(option); result = curl_easy_setopt(conn->handle, CURLOPT_POSTFIELDS, conn->curl_POSTFIELDS); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_LONG( POSTFIELDSIZE) SETOPT_STRING( REFERER) SETOPT_STRING( USERAGENT) SETOPT_STRING( FTPPORT) SETOPT_LONG( LOW_SPEED_LIMIT) SETOPT_LONG( LOW_SPEED_TIME) SETOPT_LONG( RESUME_FROM) SETOPT_STRING( COOKIE) SETOPT_SLIST( HTTPHEADER) static void handle_HTTPPOST(Connection *conn, value option) { CAMLparam1(option); CAMLlocal3(listIter, formItem, contentType); CURLcode result = CURLE_OK; listIter = option; free_curl_slist(conn->httpPostBuffers); if (conn->httpPostFirst != NULL) curl_formfree(conn->httpPostFirst); conn->httpPostBuffers = NULL; conn->httpPostFirst = NULL; conn->httpPostLast = NULL; while (!Is_long(listIter)) { formItem = Field(listIter, 0); switch (Tag_val(formItem)) { case 0: /* CURLFORM_CONTENT */ if (Wosize_val(formItem) < 3) { caml_failwith("Incorrect CURLFORM_CONTENT parameters"); } if (Is_long(Field(formItem, 2)) && Long_val(Field(formItem, 2)) == 0) { curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_COPYCONTENTS, String_val(Field(formItem, 1)), CURLFORM_CONTENTSLENGTH, caml_string_length(Field(formItem, 1)), CURLFORM_END); } else if (Is_block(Field(formItem, 2))) { contentType = Field(formItem, 2); curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_COPYCONTENTS, String_val(Field(formItem, 1)), CURLFORM_CONTENTSLENGTH, caml_string_length(Field(formItem, 1)), CURLFORM_CONTENTTYPE, String_val(Field(contentType, 0)), CURLFORM_END); } else { caml_failwith("Incorrect CURLFORM_CONTENT parameters"); } break; case 1: /* CURLFORM_FILECONTENT */ if (Wosize_val(formItem) < 3) { caml_failwith("Incorrect CURLFORM_FILECONTENT parameters"); } if (Is_long(Field(formItem, 2)) && Long_val(Field(formItem, 2)) == 0) { curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_FILECONTENT, String_val(Field(formItem, 1)), CURLFORM_END); } else if (Is_block(Field(formItem, 2))) { contentType = Field(formItem, 2); curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_FILECONTENT, String_val(Field(formItem, 1)), CURLFORM_CONTENTTYPE, String_val(Field(contentType, 0)), CURLFORM_END); } else { caml_failwith("Incorrect CURLFORM_FILECONTENT parameters"); } break; case 2: /* CURLFORM_FILE */ if (Wosize_val(formItem) < 3) { caml_failwith("Incorrect CURLFORM_FILE parameters"); } if (Is_long(Field(formItem, 2)) && Long_val(Field(formItem, 2)) == 0) { curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_FILE, String_val(Field(formItem, 1)), CURLFORM_END); } else if (Is_block(Field(formItem, 2))) { contentType = Field(formItem, 2); curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_FILE, String_val(Field(formItem, 1)), CURLFORM_CONTENTTYPE, String_val(Field(contentType, 0)), CURLFORM_END); } else { caml_failwith("Incorrect CURLFORM_FILE parameters"); } break; case 3: /* CURLFORM_BUFFER */ if (Wosize_val(formItem) < 4) { caml_failwith("Incorrect CURLFORM_BUFFER parameters"); } if (Is_long(Field(formItem, 3)) && Long_val(Field(formItem, 3)) == 0) { conn->httpPostBuffers = curl_slist_prepend_ml(conn->httpPostBuffers, Field(formItem, 2)); curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_BUFFER, String_val(Field(formItem, 1)), CURLFORM_BUFFERPTR, conn->httpPostBuffers->data, CURLFORM_BUFFERLENGTH, caml_string_length(Field(formItem, 2)), CURLFORM_END); } else if (Is_block(Field(formItem, 3))) { conn->httpPostBuffers = curl_slist_prepend_ml(conn->httpPostBuffers, Field(formItem, 2)); contentType = Field(formItem, 3); curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, CURLFORM_COPYNAME, String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, caml_string_length(Field(formItem, 0)), CURLFORM_BUFFER, String_val(Field(formItem, 1)), CURLFORM_BUFFERPTR, conn->httpPostBuffers->data, CURLFORM_BUFFERLENGTH, caml_string_length(Field(formItem, 2)), CURLFORM_CONTENTTYPE, String_val(Field(contentType, 0)), CURLFORM_END); } else { caml_failwith("Incorrect CURLFORM_BUFFER parameters"); } break; } listIter = Field(listIter, 1); } result = curl_easy_setopt(conn->handle, CURLOPT_HTTPPOST, conn->httpPostFirst); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_STRING( SSLCERT) SETOPT_STRING( SSLCERTTYPE) SETOPT_STRING( SSLCERTPASSWD) SETOPT_STRING( SSLKEY) SETOPT_STRING( SSLKEYTYPE) SETOPT_STRING( SSLKEYPASSWD) SETOPT_STRING( SSLENGINE) SETOPT_BOOL( SSLENGINE_DEFAULT) SETOPT_BOOL( CRLF) SETOPT_SLIST( QUOTE) SETOPT_SLIST( POSTQUOTE) SETOPT_STRING( COOKIEFILE) #if HAVE_DECL_CURLOPT_CERTINFO SETOPT_BOOL( CERTINFO) #endif #if !HAVE_DECL_CURL_SSLVERSION_TLSV1_0 #define CURL_SSLVERSION_TLSv1_0 CURL_SSLVERSION_TLSv1 #endif #if !HAVE_DECL_CURL_SSLVERSION_TLSV1_1 #define CURL_SSLVERSION_TLSv1_1 CURL_SSLVERSION_TLSv1 #endif #if !HAVE_DECL_CURL_SSLVERSION_TLSV1_2 #define CURL_SSLVERSION_TLSv1_2 CURL_SSLVERSION_TLSv1 #endif #if !HAVE_DECL_CURL_SSLVERSION_TLSV1_3 #define CURL_SSLVERSION_TLSv1_3 CURL_SSLVERSION_TLSv1 #endif static void handle_SSLVERSION(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; int v = CURL_SSLVERSION_DEFAULT; switch (Long_val(option)) { case 0: v = CURL_SSLVERSION_DEFAULT; break; case 1: v = CURL_SSLVERSION_TLSv1; break; case 2: v = CURL_SSLVERSION_SSLv2; break; case 3: v = CURL_SSLVERSION_SSLv3; break; case 4: v = CURL_SSLVERSION_TLSv1_0; break; case 5: v = CURL_SSLVERSION_TLSv1_1; break; case 6: v = CURL_SSLVERSION_TLSv1_2; break; case 7: v = CURL_SSLVERSION_TLSv1_3; break; default: caml_failwith("Invalid SSLVERSION Option"); break; } result = curl_easy_setopt(conn->handle, CURLOPT_SSLVERSION, v); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } static void handle_TIMECONDITION(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; int timecond = CURL_TIMECOND_NONE; switch (Long_val(option)) { case 0: timecond = CURL_TIMECOND_NONE; break; case 1: timecond = CURL_TIMECOND_IFMODSINCE; break; case 2: timecond = CURL_TIMECOND_IFUNMODSINCE; break; case 3: timecond = CURL_TIMECOND_LASTMOD; break; default: caml_failwith("Invalid TIMECOND Option"); break; } result = curl_easy_setopt(conn->handle, CURLOPT_TIMECONDITION, timecond); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_VAL( TIMEVALUE, Int32_val) SETOPT_STRING( CUSTOMREQUEST) SETOPT_STRING( INTERFACE) static void handle_KRB4LEVEL(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* KRB4_NONE */ result = curl_easy_setopt(conn->handle, CURLOPT_KRB4LEVEL, NULL); break; case 1: /* KRB4_CLEAR */ result = curl_easy_setopt(conn->handle, CURLOPT_KRB4LEVEL, "clear"); break; case 2: /* KRB4_SAFE */ result = curl_easy_setopt(conn->handle, CURLOPT_KRB4LEVEL, "safe"); break; case 3: /* KRB4_CONFIDENTIAL */ result = curl_easy_setopt(conn->handle, CURLOPT_KRB4LEVEL, "confidential"); break; case 4: /* KRB4_PRIVATE */ result = curl_easy_setopt(conn->handle, CURLOPT_KRB4LEVEL, "private"); break; default: caml_failwith("Invalid KRB4 Option"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_BOOL( SSL_VERIFYPEER) SETOPT_STRING( CAINFO) SETOPT_STRING( CAPATH) SETOPT_BOOL( FILETIME) SETOPT_LONG( MAXREDIRS) SETOPT_LONG( MAXCONNECTS) static void handle_CLOSEPOLICY(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* CLOSEPOLICY_OLDEST */ result = curl_easy_setopt(conn->handle, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_OLDEST); break; case 1: /* CLOSEPOLICY_LEAST_RECENTLY_USED */ result = curl_easy_setopt(conn->handle, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_LEAST_RECENTLY_USED); break; default: caml_failwith("Invalid CLOSEPOLICY Option"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_BOOL( FRESH_CONNECT) SETOPT_BOOL( FORBID_REUSE) SETOPT_STRING( RANDOM_FILE) SETOPT_STRING( EGDSOCKET) SETOPT_LONG( CONNECTTIMEOUT) SETOPT_BOOL( HTTPGET) static void handle_SSL_VERIFYHOST(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* SSLVERIFYHOST_NONE */ case 1: /* SSLVERIFYHOST_EXISTENCE */ case 2: /* SSLVERIFYHOST_HOSTNAME */ result = curl_easy_setopt(conn->handle, CURLOPT_SSL_VERIFYHOST, /* map EXISTENCE to HOSTNAME */ Long_val(option) == 0 ? 0 : 2); break; default: caml_failwith("Invalid SSLVERIFYHOST Option"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_STRING( COOKIEJAR) SETOPT_STRING( SSL_CIPHER_LIST) static void handle_HTTP_VERSION(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; long version = CURL_HTTP_VERSION_NONE; switch (Long_val(option)) { case 0: version = CURL_HTTP_VERSION_NONE; break; case 1: version = CURL_HTTP_VERSION_1_0; break; case 2: version = CURL_HTTP_VERSION_1_1; break; case 3: #if HAVE_DECL_CURL_HTTP_VERSION_2 version = CURL_HTTP_VERSION_2; #elif HAVE_DECL_CURL_HTTP_VERSION_2_0 version = CURL_HTTP_VERSION_2_0; #endif break; case 4: #if HAVE_DECL_CURL_HTTP_VERSION_2TLS version = CURL_HTTP_VERSION_2TLS; #endif break; case 5: #if HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE version = CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE; #endif break; default: caml_invalid_argument("CURLOPT_HTTP_VERSION"); break; } result = curl_easy_setopt(conn->handle, CURLOPT_HTTP_VERSION, version); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } SETOPT_BOOL( FTP_USE_EPSV) SETOPT_LONG( DNS_CACHE_TIMEOUT) SETOPT_BOOL( DNS_USE_GLOBAL_CACHE) static void handle_PRIVATE(Connection *conn, value option) { CAMLparam1(option); Store_field(conn->ocamlValues, Ocaml_PRIVATE, option); CAMLreturn0; } #if HAVE_DECL_CURLOPT_HTTP200ALIASES SETOPT_SLIST( HTTP200ALIASES) #endif #if HAVE_DECL_CURLOPT_UNRESTRICTED_AUTH SETOPT_BOOL( UNRESTRICTED_AUTH) #endif #if HAVE_DECL_CURLOPT_FTP_USE_EPRT SETOPT_BOOL( FTP_USE_EPRT) #endif #if HAVE_DECL_CURLOPT_HTTPAUTH static void handle_HTTPAUTH(Connection *conn, value option) { CAMLparam1(option); CAMLlocal1(listIter); CURLcode result = CURLE_OK; long auth = CURLAUTH_NONE; listIter = option; while (!Is_long(listIter)) { switch (Long_val(Field(listIter, 0))) { case 0: /* CURLAUTH_BASIC */ auth |= CURLAUTH_BASIC; break; case 1: /* CURLAUTH_DIGEST */ auth |= CURLAUTH_DIGEST; break; case 2: /* CURLAUTH_GSSNEGOTIATE */ auth |= CURLAUTH_GSSNEGOTIATE; break; case 3: /* CURLAUTH_NTLM */ auth |= CURLAUTH_NTLM; break; case 4: /* CURLAUTH_ANY */ auth |= CURLAUTH_ANY; break; case 5: /* CURLAUTH_ANYSAFE */ auth |= CURLAUTH_ANYSAFE; break; default: caml_failwith("Invalid HTTPAUTH Value"); break; } listIter = Field(listIter, 1); } result = curl_easy_setopt(conn->handle, CURLOPT_HTTPAUTH, auth); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_FTP_CREATE_MISSING_DIRS SETOPT_BOOL( FTP_CREATE_MISSING_DIRS) #endif #if HAVE_DECL_CURLOPT_PROXYAUTH static void handle_PROXYAUTH(Connection *conn, value option) { CAMLparam1(option); CAMLlocal1(listIter); CURLcode result = CURLE_OK; long auth = CURLAUTH_NONE; listIter = option; while (!Is_long(listIter)) { switch (Long_val(Field(listIter, 0))) { case 0: /* CURLAUTH_BASIC */ auth |= CURLAUTH_BASIC; break; case 1: /* CURLAUTH_DIGEST */ auth |= CURLAUTH_DIGEST; break; case 2: /* CURLAUTH_GSSNEGOTIATE */ auth |= CURLAUTH_GSSNEGOTIATE; break; case 3: /* CURLAUTH_NTLM */ auth |= CURLAUTH_NTLM; break; case 4: /* CURLAUTH_ANY */ auth |= CURLAUTH_ANY; break; case 5: /* CURLAUTH_ANYSAFE */ auth |= CURLAUTH_ANYSAFE; break; default: caml_failwith("Invalid HTTPAUTH Value"); break; } listIter = Field(listIter, 1); } result = curl_easy_setopt(conn->handle, CURLOPT_PROXYAUTH, auth); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_FTP_RESPONSE_TIMEOUT SETOPT_LONG( FTP_RESPONSE_TIMEOUT) #endif #if HAVE_DECL_CURLOPT_IPRESOLVE static void handle_IPRESOLVE(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* CURL_IPRESOLVE_WHATEVER */ result = curl_easy_setopt(conn->handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER); break; case 1: /* CURL_IPRESOLVE_V4 */ result = curl_easy_setopt(conn->handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); break; case 2: /* CURL_IPRESOLVE_V6 */ result = curl_easy_setopt(conn->handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); break; default: caml_failwith("Invalid IPRESOLVE Value"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_MAXFILESIZE SETOPT_VAL( MAXFILESIZE, Int32_val) #endif #if HAVE_DECL_CURLOPT_INFILESIZE_LARGE SETOPT_INT64( INFILESIZE_LARGE) #endif #if HAVE_DECL_CURLOPT_RESUME_FROM_LARGE SETOPT_INT64( RESUME_FROM_LARGE) #endif #if HAVE_DECL_CURLOPT_MAXFILESIZE_LARGE SETOPT_INT64( MAXFILESIZE_LARGE) #endif #if HAVE_DECL_CURLOPT_NETRC_FILE SETOPT_STRING( NETRC_FILE) #endif #if HAVE_DECL_CURLOPT_FTP_SSL static void handle_FTP_SSL(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* CURLFTPSSL_NONE */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_SSL, CURLFTPSSL_NONE); break; case 1: /* CURLFTPSSL_TRY */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_SSL, CURLFTPSSL_TRY); break; case 2: /* CURLFTPSSL_CONTROL */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_SSL, CURLFTPSSL_CONTROL); break; case 3: /* CURLFTPSSL_ALL */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_SSL, CURLFTPSSL_ALL); break; default: caml_failwith("Invalid FTP_SSL Value"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_POSTFIELDSIZE_LARGE SETOPT_INT64( POSTFIELDSIZE_LARGE) #endif #if HAVE_DECL_CURLOPT_TCP_NODELAY /* not using SETOPT_BOOL here because of TCP_NODELAY defined in winsock.h */ SETOPT_VAL_( handle_TCP_NODELAY, CURLOPT_TCP_NODELAY, Bool_val) #endif #if HAVE_DECL_CURLOPT_FTPSSLAUTH static void handle_FTPSSLAUTH(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* CURLFTPAUTH_DEFAULT */ result = curl_easy_setopt(conn->handle, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_DEFAULT); break; case 1: /* CURLFTPAUTH_SSL */ result = curl_easy_setopt(conn->handle, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL); break; case 2: /* CURLFTPAUTH_TLS */ result = curl_easy_setopt(conn->handle, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_TLS); break; default: caml_failwith("Invalid FTPSSLAUTH value"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_FTP_ACCOUNT SETOPT_STRING( FTP_ACCOUNT) #endif #if HAVE_DECL_CURLOPT_COOKIELIST SETOPT_STRING( COOKIELIST) #endif #if HAVE_DECL_CURLOPT_IGNORE_CONTENT_LENGTH SETOPT_BOOL( IGNORE_CONTENT_LENGTH) #endif #if HAVE_DECL_CURLOPT_FTP_SKIP_PASV_IP SETOPT_BOOL( FTP_SKIP_PASV_IP) #endif #if HAVE_DECL_CURLOPT_FTP_FILEMETHOD static void handle_FTP_FILEMETHOD(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* CURLFTPMETHOD_DEFAULT */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_DEFAULT); break; case 1: /* CURLFTMETHOD_MULTICWD */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_MULTICWD); break; case 2: /* CURLFTPMETHOD_NOCWD */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_NOCWD); break; case 3: /* CURLFTPMETHOD_SINGLECWD */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD); default: caml_failwith("Invalid FTP_FILEMETHOD value"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_LOCALPORT SETOPT_LONG( LOCALPORT) #endif #if HAVE_DECL_CURLOPT_LOCALPORTRANGE SETOPT_LONG( LOCALPORTRANGE) #endif #if HAVE_DECL_CURLOPT_CONNECT_ONLY SETOPT_BOOL( CONNECT_ONLY) #endif #if HAVE_DECL_CURLOPT_MAX_SEND_SPEED_LARGE SETOPT_INT64( MAX_SEND_SPEED_LARGE) #endif #if HAVE_DECL_CURLOPT_MAX_RECV_SPEED_LARGE SETOPT_INT64( MAX_RECV_SPEED_LARGE) #endif #if HAVE_DECL_CURLOPT_FTP_ALTERNATIVE_TO_USER SETOPT_STRING( FTP_ALTERNATIVE_TO_USER) #endif #if HAVE_DECL_CURLOPT_SSL_SESSIONID_CACHE SETOPT_BOOL( SSL_SESSIONID_CACHE) #endif #if HAVE_DECL_CURLOPT_SSH_AUTH_TYPES static void handle_SSH_AUTH_TYPES(Connection *conn, value option) { CAMLparam1(option); CAMLlocal1(listIter); CURLcode result = CURLE_OK; long authTypes = CURLSSH_AUTH_NONE; listIter = option; while (!Is_long(listIter)) { switch (Long_val(Field(listIter, 0))) { case 0: /* CURLSSH_AUTH_ANY */ authTypes |= CURLSSH_AUTH_ANY; break; case 1: /* CURLSSH_AUTH_PUBLICKEY */ authTypes |= CURLSSH_AUTH_PUBLICKEY; break; case 2: /* CURLSSH_AUTH_PASSWORD */ authTypes |= CURLSSH_AUTH_PASSWORD; break; case 3: /* CURLSSH_AUTH_HOST */ authTypes |= CURLSSH_AUTH_HOST; break; case 4: /* CURLSSH_AUTH_KEYBOARD */ authTypes |= CURLSSH_AUTH_KEYBOARD; break; default: caml_failwith("Invalid CURLSSH_AUTH_TYPES Value"); break; } listIter = Field(listIter, 1); } result = curl_easy_setopt(conn->handle, CURLOPT_SSH_AUTH_TYPES, authTypes); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_SSH_PUBLIC_KEYFILE SETOPT_STRING( SSH_PUBLIC_KEYFILE) #endif #if HAVE_DECL_CURLOPT_SSH_PRIVATE_KEYFILE SETOPT_STRING( SSH_PRIVATE_KEYFILE) #endif #if HAVE_DECL_CURLOPT_FTP_SSL_CCC static void handle_FTP_SSL_CCC(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; switch (Long_val(option)) { case 0: /* CURLFTPSSL_CCC_NONE */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_NONE); break; case 1: /* CURLFTPSSL_CCC_PASSIVE */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_PASSIVE); break; case 2: /* CURLFTPSSL_CCC_ACTIVE */ result = curl_easy_setopt(conn->handle, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE); break; default: caml_failwith("Invalid FTPSSL_CCC value"); break; } if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_TIMEOUT_MS SETOPT_LONG( TIMEOUT_MS) #endif #if HAVE_DECL_CURLOPT_CONNECTTIMEOUT_MS SETOPT_LONG( CONNECTTIMEOUT_MS) #endif #if HAVE_DECL_CURLOPT_HTTP_TRANSFER_DECODING SETOPT_BOOL( HTTP_TRANSFER_DECODING) #endif #if HAVE_DECL_CURLOPT_HTTP_CONTENT_DECODING SETOPT_BOOL( HTTP_CONTENT_DECODING) #endif #if HAVE_DECL_CURLOPT_NEW_FILE_PERMS SETOPT_LONG( NEW_FILE_PERMS) #endif #if HAVE_DECL_CURLOPT_NEW_DIRECTORY_PERMS SETOPT_LONG( NEW_DIRECTORY_PERMS) #endif #if HAVE_DECL_CURLOPT_POST301 SETOPT_BOOL( POST301) #endif #if HAVE_DECL_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 SETOPT_STRING( SSH_HOST_PUBLIC_KEY_MD5) #endif #if HAVE_DECL_CURLOPT_COPYPOSTFIELDS SETOPT_STRING( COPYPOSTFIELDS) #endif #if HAVE_DECL_CURLOPT_PROXY_TRANSFER_MODE SETOPT_BOOL( PROXY_TRANSFER_MODE) #endif #if HAVE_DECL_CURLOPT_AUTOREFERER SETOPT_BOOL( AUTOREFERER) #endif #if HAVE_DECL_CURLOPT_PROXYTYPE static void handle_PROXYTYPE(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; long proxy_type; switch (Long_val(option)) { case 0: proxy_type = CURLPROXY_HTTP; break; case 1: proxy_type = CURLPROXY_HTTP_1_0; break; case 2: proxy_type = CURLPROXY_SOCKS4; break; case 3: proxy_type = CURLPROXY_SOCKS5; break; case 4: proxy_type = CURLPROXY_SOCKS4A; break; case 5: proxy_type = CURLPROXY_SOCKS5_HOSTNAME; break; default: caml_failwith("Invalid curl proxy type"); } result = curl_easy_setopt(conn->handle, CURLOPT_PROXYTYPE, proxy_type); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_PROTOCOLS || HAVE_DECL_CURLOPT_REDIR_PROTOCOLS long protoMap[] = { CURLPROTO_ALL, CURLPROTO_HTTP, CURLPROTO_HTTPS, CURLPROTO_FTP, CURLPROTO_FTPS, CURLPROTO_SCP, CURLPROTO_SFTP, CURLPROTO_TELNET, CURLPROTO_LDAP, CURLPROTO_LDAPS, CURLPROTO_DICT, CURLPROTO_FILE, CURLPROTO_TFTP, /* factor out with autoconf? */ #if defined(CURLPROTO_IMAP) CURLPROTO_IMAP, #else 0, #endif #if defined(CURLPROTO_IMAPS) CURLPROTO_IMAPS, #else 0, #endif #if defined(CURLPROTO_POP3) CURLPROTO_POP3, #else 0, #endif #if defined(CURLPROTO_POP3S) CURLPROTO_POP3S, #else 0, #endif #if defined(CURLPROTO_SMTP) CURLPROTO_SMTP, #else 0, #endif #if defined(CURLPROTO_SMTPS) CURLPROTO_SMTPS, #else 0, #endif #if defined(CURLPROTO_RTSP) CURLPROTO_RTSP, #else 0, #endif #if defined(CURLPROTO_RTMP) CURLPROTO_RTMP, #else 0, #endif #if defined(CURLPROTO_RTMPT) CURLPROTO_RTMPT, #else 0, #endif #if defined(CURLPROTO_RTMPE) CURLPROTO_RTMPE, #else 0, #endif #if defined(CURLPROTO_RTMPTE) CURLPROTO_RTMPTE, #else 0, #endif #if defined(CURLPROTO_RTMPS) CURLPROTO_RTMPS, #else 0, #endif #if defined(CURLPROTO_RTMPTS) CURLPROTO_RTMPTS, #else 0, #endif #if defined(CURLPROTO_GOPHER) CURLPROTO_GOPHER, #else 0, #endif }; static void handle_PROTOCOLSOPTION(CURLoption curlopt, Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; long bits = convert_bit_list(protoMap, sizeof(protoMap) / sizeof(protoMap[0]), option); result = curl_easy_setopt(conn->handle, curlopt, bits); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif #if HAVE_DECL_CURLOPT_PROTOCOLS static void handle_PROTOCOLS(Connection *conn, value option) { handle_PROTOCOLSOPTION(CURLOPT_PROTOCOLS, conn, option); } #endif #if HAVE_DECL_CURLOPT_REDIR_PROTOCOLS static void handle_REDIR_PROTOCOLS(Connection *conn, value option) { handle_PROTOCOLSOPTION(CURLOPT_REDIR_PROTOCOLS, conn, option); } #endif #if HAVE_DECL_CURLOPT_RESOLVE SETOPT_SLIST( RESOLVE) #endif #if HAVE_DECL_CURLOPT_DNS_SERVERS SETOPT_STRING( DNS_SERVERS) #endif #if HAVE_DECL_CURLOPT_MAIL_FROM SETOPT_STRING( MAIL_FROM) #endif #if HAVE_DECL_CURLOPT_MAIL_RCPT SETOPT_SLIST( MAIL_RCPT) #endif #if HAVE_DECL_CURLOPT_PIPEWAIT SETOPT_BOOL( PIPEWAIT) #endif #if HAVE_DECL_CURLOPT_USERNAME SETOPT_STRING( USERNAME) #endif #if HAVE_DECL_CURLOPT_PASSWORD SETOPT_STRING( PASSWORD) #endif #if HAVE_DECL_CURLOPT_LOGIN_OPTIONS SETOPT_STRING( LOGIN_OPTIONS) #endif #if HAVE_DECL_CURLOPT_CONNECT_TO SETOPT_SLIST( CONNECT_TO) #endif #if HAVE_DECL_CURLOPT_POSTREDIR static int curlPostRedir_table[] = { CURL_REDIR_POST_ALL, #if defined(CURL_REDIR_POST_301) CURL_REDIR_POST_301, #else 0, #endif #if defined(CURL_REDIR_POST_302) CURL_REDIR_POST_302, #else 0, #endif #if defined(CURL_REDIR_POST_303) CURL_REDIR_POST_303, #else 0, #endif }; static void handle_POSTREDIR(Connection *conn, value option) { CAMLparam1(option); CURLcode result = CURLE_OK; long bitmask = caml_convert_flag_list(option, curlPostRedir_table); result = curl_easy_setopt(conn->handle, CURLOPT_POSTREDIR, bitmask); if (result != CURLE_OK) raiseError(conn, result); CAMLreturn0; } #endif SETOPT_VAL( SSH_KNOWNHOSTS, String_val) /** ** curl_easy_setopt helper function **/ #define CURLOPT(name) { handle_ ## name, "CURLOPT_"#name } #define HAVENOT(name) { NULL, "CURLOPT_"#name } CURLOptionMapping implementedOptionMap[] = { CURLOPT(WRITEFUNCTION), CURLOPT(READFUNCTION), CURLOPT(INFILESIZE), CURLOPT(URL), CURLOPT(PROXY), CURLOPT(PROXYPORT), CURLOPT(HTTPPROXYTUNNEL), CURLOPT(VERBOSE), CURLOPT(HEADER), CURLOPT(NOPROGRESS), #if HAVE_DECL_CURLOPT_NOSIGNAL CURLOPT(NOSIGNAL), #else HAVENOT(NOSIGNAL), #endif CURLOPT(NOBODY), CURLOPT(FAILONERROR), CURLOPT(UPLOAD), CURLOPT(POST), CURLOPT(FTPLISTONLY), CURLOPT(FTPAPPEND), CURLOPT(NETRC), #if HAVE_DECL_CURLOPT_ENCODING CURLOPT(ENCODING), #else HAVENOT(ENCODING), #endif CURLOPT(FOLLOWLOCATION), CURLOPT(TRANSFERTEXT), CURLOPT(PUT), CURLOPT(USERPWD), CURLOPT(PROXYUSERPWD), CURLOPT(RANGE), CURLOPT(ERRORBUFFER), /* mutable buffer, as output value, do not duplicate */ CURLOPT(TIMEOUT), CURLOPT(POSTFIELDS), CURLOPT(POSTFIELDSIZE), CURLOPT(REFERER), CURLOPT(USERAGENT), CURLOPT(FTPPORT), CURLOPT(LOW_SPEED_LIMIT), CURLOPT(LOW_SPEED_TIME), CURLOPT(RESUME_FROM), CURLOPT(COOKIE), CURLOPT(HTTPHEADER), CURLOPT(HTTPPOST), CURLOPT(SSLCERT), CURLOPT(SSLCERTTYPE), CURLOPT(SSLCERTPASSWD), CURLOPT(SSLKEY), CURLOPT(SSLKEYTYPE), CURLOPT(SSLKEYPASSWD), CURLOPT(SSLENGINE), CURLOPT(SSLENGINE_DEFAULT), CURLOPT(CRLF), CURLOPT(QUOTE), CURLOPT(POSTQUOTE), CURLOPT(HEADERFUNCTION), CURLOPT(COOKIEFILE), CURLOPT(SSLVERSION), CURLOPT(TIMECONDITION), CURLOPT(TIMEVALUE), CURLOPT(CUSTOMREQUEST), CURLOPT(INTERFACE), CURLOPT(KRB4LEVEL), CURLOPT(PROGRESSFUNCTION), CURLOPT(SSL_VERIFYPEER), CURLOPT(CAINFO), CURLOPT(CAPATH), CURLOPT(FILETIME), CURLOPT(MAXREDIRS), CURLOPT(MAXCONNECTS), CURLOPT(CLOSEPOLICY), CURLOPT(FRESH_CONNECT), CURLOPT(FORBID_REUSE), CURLOPT(RANDOM_FILE), CURLOPT(EGDSOCKET), CURLOPT(CONNECTTIMEOUT), CURLOPT(HTTPGET), CURLOPT(SSL_VERIFYHOST), CURLOPT(COOKIEJAR), CURLOPT(SSL_CIPHER_LIST), CURLOPT(HTTP_VERSION), CURLOPT(FTP_USE_EPSV), CURLOPT(DNS_CACHE_TIMEOUT), CURLOPT(DNS_USE_GLOBAL_CACHE), CURLOPT(DEBUGFUNCTION), CURLOPT(PRIVATE), #if HAVE_DECL_CURLOPT_HTTP200ALIASES CURLOPT(HTTP200ALIASES), #else HAVENOT(HTTP200ALIASES), #endif #if HAVE_DECL_CURLOPT_UNRESTRICTED_AUTH CURLOPT(UNRESTRICTED_AUTH), #else HAVENOT(UNRESTRICTED_AUTH), #endif #if HAVE_DECL_CURLOPT_FTP_USE_EPRT CURLOPT(FTP_USE_EPRT), #else HAVENOT(FTP_USE_EPRT), #endif #if HAVE_DECL_CURLOPT_HTTPAUTH CURLOPT(HTTPAUTH), #else HAVENOT(HTTPAUTH), #endif #if HAVE_DECL_CURLOPT_FTP_CREATE_MISSING_DIRS CURLOPT(FTP_CREATE_MISSING_DIRS), #else HAVENOT(FTP_CREATE_MISSING_DIRS), #endif #if HAVE_DECL_CURLOPT_PROXYAUTH CURLOPT(PROXYAUTH), #else HAVENOT(PROXYAUTH), #endif #if HAVE_DECL_CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT(FTP_RESPONSE_TIMEOUT), #else HAVENOT(FTP_RESPONSE_TIMEOUT), #endif #if HAVE_DECL_CURLOPT_IPRESOLVE CURLOPT(IPRESOLVE), #else HAVENOT(IPRESOLVE), #endif #if HAVE_DECL_CURLOPT_MAXFILESIZE CURLOPT(MAXFILESIZE), #else HAVENOT(MAXFILESIZE), #endif #if HAVE_DECL_CURLOPT_INFILESIZE_LARGE CURLOPT(INFILESIZE_LARGE), #else HAVENOT(INFILESIZE_LARGE), #endif #if HAVE_DECL_CURLOPT_RESUME_FROM_LARGE CURLOPT(RESUME_FROM_LARGE), #else HAVENOT(RESUME_FROM_LARGE), #endif #if HAVE_DECL_CURLOPT_MAXFILESIZE_LARGE CURLOPT(MAXFILESIZE_LARGE), #else HAVENOT(MAXFILESIZE_LARGE), #endif #if HAVE_DECL_CURLOPT_NETRC_FILE CURLOPT(NETRC_FILE), #else HAVENOT(NETRC_FILE), #endif #if HAVE_DECL_CURLOPT_FTP_SSL CURLOPT(FTP_SSL), #else HAVENOT(FTP_SSL), #endif #if HAVE_DECL_CURLOPT_POSTFIELDSIZE_LARGE CURLOPT(POSTFIELDSIZE_LARGE), #else HAVENOT(POSTFIELDSIZE_LARGE), #endif #if HAVE_DECL_CURLOPT_TCP_NODELAY CURLOPT(TCP_NODELAY), #else HAVENOT(TCP_NODELAY), #endif #if HAVE_DECL_CURLOPT_FTPSSLAUTH CURLOPT(FTPSSLAUTH), #else HAVENOT(FTPSSLAUTH), #endif #if HAVE_DECL_CURLOPT_IOCTLFUNCTION CURLOPT(IOCTLFUNCTION), #else HAVENOT(IOCTLFUNCTION), #endif #if HAVE_DECL_CURLOPT_FTP_ACCOUNT CURLOPT(FTP_ACCOUNT), #else HAVENOT(FTP_ACCOUNT), #endif #if HAVE_DECL_CURLOPT_COOKIELIST CURLOPT(COOKIELIST), #else HAVENOT(COOKIELIST), #endif #if HAVE_DECL_CURLOPT_IGNORE_CONTENT_LENGTH CURLOPT(IGNORE_CONTENT_LENGTH), #else HAVENOT(IGNORE_CONTENT_LENGTH), #endif #if HAVE_DECL_CURLOPT_FTP_SKIP_PASV_IP CURLOPT(FTP_SKIP_PASV_IP), #else HAVENOT(FTP_SKIP_PASV_IP), #endif #if HAVE_DECL_CURLOPT_FTP_FILEMETHOD CURLOPT(FTP_FILEMETHOD), #else HAVENOT(FTP_FILEMETHOD), #endif #if HAVE_DECL_CURLOPT_LOCALPORT CURLOPT(LOCALPORT), #else HAVENOT(LOCALPORT), #endif #if HAVE_DECL_CURLOPT_LOCALPORTRANGE CURLOPT(LOCALPORTRANGE), #else HAVENOT(LOCALPORTRANGE), #endif #if HAVE_DECL_CURLOPT_CONNECT_ONLY CURLOPT(CONNECT_ONLY), #else HAVENOT(CONNECT_ONLY), #endif #if HAVE_DECL_CURLOPT_MAX_SEND_SPEED_LARGE CURLOPT(MAX_SEND_SPEED_LARGE), #else HAVENOT(MAX_SEND_SPEED_LARGE), #endif #if HAVE_DECL_CURLOPT_MAX_RECV_SPEED_LARGE CURLOPT(MAX_RECV_SPEED_LARGE), #else HAVENOT(MAX_RECV_SPEED_LARGE), #endif #if HAVE_DECL_CURLOPT_FTP_ALTERNATIVE_TO_USER CURLOPT(FTP_ALTERNATIVE_TO_USER), #else HAVENOT(FTP_ALTERNATIVE_TO_USER), #endif #if HAVE_DECL_CURLOPT_SSL_SESSIONID_CACHE CURLOPT(SSL_SESSIONID_CACHE), #else HAVENOT(SSL_SESSIONID_CACHE), #endif #if HAVE_DECL_CURLOPT_SSH_AUTH_TYPES CURLOPT(SSH_AUTH_TYPES), #else HAVENOT(SSH_AUTH_TYPES), #endif #if HAVE_DECL_CURLOPT_SSH_PUBLIC_KEYFILE CURLOPT(SSH_PUBLIC_KEYFILE), #else HAVENOT(SSH_PUBLIC_KEYFILE), #endif #if HAVE_DECL_CURLOPT_SSH_PRIVATE_KEYFILE CURLOPT(SSH_PRIVATE_KEYFILE), #else HAVENOT(SSH_PRIVATE_KEYFILE), #endif #if HAVE_DECL_CURLOPT_FTP_SSL_CCC CURLOPT(FTP_SSL_CCC), #else HAVENOT(FTP_SSL_CCC), #endif #if HAVE_DECL_CURLOPT_TIMEOUT_MS CURLOPT(TIMEOUT_MS), #else HAVENOT(TIMEOUT_MS), #endif #if HAVE_DECL_CURLOPT_CONNECTTIMEOUT_MS CURLOPT(CONNECTTIMEOUT_MS), #else HAVENOT(CONNECTTIMEOUT_MS), #endif #if HAVE_DECL_CURLOPT_HTTP_TRANSFER_DECODING CURLOPT(HTTP_TRANSFER_DECODING), #else HAVENOT(HTTP_TRANSFER_DECODING), #endif #if HAVE_DECL_CURLOPT_HTTP_CONTENT_DECODING CURLOPT(HTTP_CONTENT_DECODING), #else HAVENOT(HTTP_CONTENT_DECODING), #endif #if HAVE_DECL_CURLOPT_NEW_FILE_PERMS CURLOPT(NEW_FILE_PERMS), #else HAVENOT(NEW_FILE_PERMS), #endif #if HAVE_DECL_CURLOPT_NEW_DIRECTORY_PERMS CURLOPT(NEW_DIRECTORY_PERMS), #else HAVENOT(NEW_DIRECTORY_PERMS), #endif #if HAVE_DECL_CURLOPT_POST301 CURLOPT(POST301), #else HAVENOT(POST301), #endif #if HAVE_DECL_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 CURLOPT(SSH_HOST_PUBLIC_KEY_MD5), #else HAVENOT(SSH_HOST_PUBLIC_KEY_MD5), #endif #if HAVE_DECL_CURLOPT_COPYPOSTFIELDS CURLOPT(COPYPOSTFIELDS), #else HAVENOT(COPYPOSTFIELDS), #endif #if HAVE_DECL_CURLOPT_PROXY_TRANSFER_MODE CURLOPT(PROXY_TRANSFER_MODE), #else HAVENOT(PROXY_TRANSFER_MODE), #endif #if HAVE_DECL_CURLOPT_SEEKFUNCTION CURLOPT(SEEKFUNCTION), #else HAVENOT(SEEKFUNCTION), #endif #if HAVE_DECL_CURLOPT_AUTOREFERER CURLOPT(AUTOREFERER), #else HAVENOT(AUTOREFERER), #endif #if HAVE_DECL_CURLOPT_OPENSOCKETFUNCTION CURLOPT(OPENSOCKETFUNCTION), #else HAVENOT(OPENSOCKETFUNCTION), #endif #if HAVE_DECL_CURLOPT_PROXYTYPE CURLOPT(PROXYTYPE), #else HAVENOT(PROXYTYPE), #endif #if HAVE_DECL_CURLOPT_PROTOCOLS CURLOPT(PROTOCOLS), #else HAVENOT(PROTOCOLS), #endif #if HAVE_DECL_CURLOPT_REDIR_PROTOCOLS CURLOPT(REDIR_PROTOCOLS), #else HAVENOT(REDIR_PROTOCOLS), #endif #if HAVE_DECL_CURLOPT_RESOLVE CURLOPT(RESOLVE), #else HAVENOT(RESOLVE), #endif #if HAVE_DECL_CURLOPT_DNS_SERVERS CURLOPT(DNS_SERVERS), #else HAVENOT(DNS_SERVERS), #endif #if HAVE_DECL_CURLOPT_MAIL_FROM CURLOPT(MAIL_FROM), #else HAVENOT(MAIL_FROM), #endif #if HAVE_DECL_CURLOPT_MAIL_RCPT CURLOPT(MAIL_RCPT), #else HAVENOT(MAIL_RCPT), #endif #if HAVE_DECL_CURLOPT_PIPEWAIT CURLOPT(PIPEWAIT), #else HAVENOT(PIPEWAIT), #endif #if HAVE_DECL_CURLOPT_CERTINFO CURLOPT(CERTINFO), #else HAVENOT(CERTINFO), #endif #if HAVE_DECL_CURLOPT_USERNAME CURLOPT(USERNAME), #else HAVENOT(USERNAME), #endif #if HAVE_DECL_CURLOPT_PASSWORD CURLOPT(PASSWORD), #else HAVENOT(PASSWORD), #endif #if HAVE_DECL_CURLOPT_LOGIN_OPTIONS CURLOPT(LOGIN_OPTIONS), #else HAVENOT(LOGIN_OPTIONS), #endif #if HAVE_DECL_CURLOPT_CONNECT_TO CURLOPT(CONNECT_TO), #else HAVENOT(CONNECT_TO), #endif #if HAVE_DECL_CURLOPT_POSTREDIR CURLOPT(POSTREDIR), #else HAVENOT(POSTREDIR), #endif #if HAVE_DECL_CURLOPT_MIMEPOST CURLOPT(MIMEPOST), #else HAVENOT(MIMEPOST), #endif CURLOPT(SSH_KNOWNHOSTS), CURLOPT(SSH_KEYFUNCTION), }; value caml_curl_easy_setopt(value conn, value option) { CAMLparam2(conn, option); CAMLlocal1(data); Connection *connection = Connection_val(conn); CURLOptionMapping* thisOption = NULL; static const value* exception = NULL; checkConnection(connection); data = Field(option, 0); if (Tag_val(option) < sizeof(implementedOptionMap)/sizeof(CURLOptionMapping)) { thisOption = &implementedOptionMap[Tag_val(option)]; if (thisOption->optionHandler) { thisOption->optionHandler(connection, data); } else { if (NULL == exception) { exception = caml_named_value("Curl.NotImplemented"); if (NULL == exception) caml_invalid_argument("Curl.NotImplemented"); } caml_raise_with_string(*exception, thisOption->name); } } else { caml_failwith("Invalid CURLOPT Option"); } CAMLreturn(Val_unit); } /** ** curl_easy_perform helper function **/ value caml_curl_easy_perform(value conn) { CAMLparam1(conn); CURLcode result = CURLE_OK; Connection *connection = Connection_val(conn); checkConnection(connection); caml_enter_blocking_section(); result = curl_easy_perform(connection->handle); caml_leave_blocking_section(); if (result != CURLE_OK) raiseError(connection, result); CAMLreturn(Val_unit); } /** ** curl_easy_cleanup helper function **/ value caml_curl_easy_cleanup(value conn) { CAMLparam1(conn); Connection *connection = Connection_val(conn); checkConnection(connection); removeConnection(connection, 0); CAMLreturn(Val_unit); } /** ** curl_easy_getinfo helper function **/ enum GetInfoResultType { StringValue, LongValue, DoubleValue, StringListValue, StringListListValue, OCamlValue, /* keep last - no matching OCaml CURLINFO_ constructor */ }; value convertStringList(struct curl_slist *p) { CAMLparam0(); CAMLlocal3(result, current, next); result = Val_emptylist; current = Val_emptylist; next = Val_emptylist; while (p != NULL) { next = caml_alloc_tuple(2); Store_field(next, 0, caml_copy_string(p->data)); Store_field(next, 1, Val_emptylist); if (result == Val_emptylist) result = next; if (current != Val_emptylist) Store_field(current, 1, next); current = next; p = p->next; } CAMLreturn(result); } value caml_curl_easy_getinfo(value conn, value option) { CAMLparam2(conn, option); CAMLlocal3(result, current, next); CURLcode curlResult; Connection *connection = Connection_val(conn); enum GetInfoResultType resultType; char *strValue = NULL; double doubleValue; long longValue; struct curl_slist *stringListValue = NULL; #if HAVE_DECL_CURLINFO_CERTINFO int i; union { struct curl_slist *to_info; struct curl_certinfo *to_certinfo; } ptr; #endif checkConnection(connection); switch(Long_val(option)) { #if HAVE_DECL_CURLINFO_EFFECTIVE_URL case 0: /* CURLINFO_EFFECTIVE_URL */ resultType = StringValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_EFFECTIVE_URL, &strValue); break; #else #pragma message("libcurl does not provide CURLINFO_EFFECTIVE_URL") #endif #if HAVE_DECL_CURLINFO_RESPONSE_CODE || HAVE_DECL_CURLINFO_HTTP_CODE case 1: /* CURLINFO_HTTP_CODE */ case 2: /* CURLINFO_RESPONSE_CODE */ #if HAVE_DECL_CURLINFO_RESPONSE_CODE resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_RESPONSE_CODE, &longValue); #else resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_HTTP_CODE, &longValue); #endif break; #endif #if HAVE_DECL_CURLINFO_TOTAL_TIME case 3: /* CURLINFO_TOTAL_TIME */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_TOTAL_TIME, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_NAMELOOKUP_TIME case 4: /* CURLINFO_NAMELOOKUP_TIME */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_NAMELOOKUP_TIME, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_CONNECT_TIME case 5: /* CURLINFO_CONNECT_TIME */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_CONNECT_TIME, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_PRETRANSFER_TIME case 6: /* CURLINFO_PRETRANSFER_TIME */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_PRETRANSFER_TIME, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_SIZE_UPLOAD case 7: /* CURLINFO_SIZE_UPLOAD */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_SIZE_UPLOAD, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_SIZE_DOWNLOAD case 8: /* CURLINFO_SIZE_DOWNLOAD */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_SIZE_DOWNLOAD, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_SPEED_DOWNLOAD case 9: /* CURLINFO_SPEED_DOWNLOAD */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_SPEED_DOWNLOAD, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_SPEED_UPLOAD case 10: /* CURLINFO_SPEED_UPLOAD */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_SPEED_UPLOAD, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_HEADER_SIZE case 11: /* CURLINFO_HEADER_SIZE */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_HEADER_SIZE, &longValue); break; #endif #if HAVE_DECL_CURLINFO_REQUEST_SIZE case 12: /* CURLINFO_REQUEST_SIZE */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_REQUEST_SIZE, &longValue); break; #endif #if HAVE_DECL_CURLINFO_SSL_VERIFYRESULT case 13: /* CURLINFO_SSL_VERIFYRESULT */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_SSL_VERIFYRESULT, &longValue); break; #endif #if HAVE_DECL_CURLINFO_FILETIME case 14: /* CURLINFO_FILETIME */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_FILETIME, &longValue); doubleValue = longValue; break; #endif #if HAVE_DECL_CURLINFO_CONTENT_LENGTH_DOWNLOAD case 15: /* CURLINFO_CONTENT_LENGTH_DOWNLOAD */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_CONTENT_LENGTH_UPLOAD case 16: /* CURLINFO_CONTENT_LENGTH_UPLOAD */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_CONTENT_LENGTH_UPLOAD, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_STARTTRANSFER_TIME case 17: /* CURLINFO_STARTTRANSFER_TIME */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_STARTTRANSFER_TIME, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_CONTENT_TYPE case 18: /* CURLINFO_CONTENT_TYPE */ resultType = StringValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_CONTENT_TYPE, &strValue); break; #endif #if HAVE_DECL_CURLINFO_REDIRECT_TIME case 19: /* CURLINFO_REDIRECT_TIME */ resultType = DoubleValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_REDIRECT_TIME, &doubleValue); break; #endif #if HAVE_DECL_CURLINFO_REDIRECT_COUNT case 20: /* CURLINFO_REDIRECT_COUNT */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_REDIRECT_COUNT, &longValue); break; #endif case 21: /* CURLINFO_PRIVATE */ resultType = OCamlValue; curlResult = CURLE_OK; result = caml_alloc(1, StringValue); Store_field(result, 0, Field(connection->ocamlValues, Ocaml_PRIVATE)); break; #if HAVE_DECL_CURLINFO_HTTP_CONNECTCODE case 22: /* CURLINFO_HTTP_CONNECTCODE */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_HTTP_CONNECTCODE, &longValue); break; #endif #if HAVE_DECL_CURLINFO_HTTPAUTH_AVAIL case 23: /* CURLINFO_HTTPAUTH_AVAIL */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_HTTPAUTH_AVAIL, &longValue); break; #endif #if HAVE_DECL_CURLINFO_PROXYAUTH_AVAIL case 24: /* CURLINFO_PROXYAUTH_AVAIL */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_PROXYAUTH_AVAIL, &longValue); break; #endif #if HAVE_DECL_CURLINFO_OS_ERRNO case 25: /* CURLINFO_OS_ERRNO */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_OS_ERRNO, &longValue); break; #endif #if HAVE_DECL_CURLINFO_NUM_CONNECTS case 26: /* CURLINFO_NUM_CONNECTS */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_NUM_CONNECTS, &longValue); break; #endif #if HAVE_DECL_CURLINFO_SSL_ENGINES case 27: /* CURLINFO_SSL_ENGINES */ resultType = StringListValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_SSL_ENGINES, &stringListValue); break; #endif #if HAVE_DECL_CURLINFO_COOKIELIST case 28: /* CURLINFO_COOKIELIST */ resultType = StringListValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_COOKIELIST, &stringListValue); break; #endif #if HAVE_DECL_CURLINFO_LASTSOCKET case 29: /* CURLINFO_LASTSOCKET */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_LASTSOCKET, &longValue); break; #endif #if HAVE_DECL_CURLINFO_FTP_ENTRY_PATH case 30: /* CURLINFO_FTP_ENTRY_PATH */ resultType = StringValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_FTP_ENTRY_PATH, &strValue); break; #endif #if HAVE_DECL_CURLINFO_REDIRECT_URL case 31: /* CURLINFO_REDIRECT_URL */ resultType = StringValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_REDIRECT_URL, &strValue); break; #else #pragma message("libcurl does not provide CURLINFO_REDIRECT_URL") #endif #if HAVE_DECL_CURLINFO_PRIMARY_IP case 32: /* CURLINFO_PRIMARY_IP */ resultType = StringValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_PRIMARY_IP, &strValue); break; #else #pragma message("libcurl does not provide CURLINFO_PRIMARY_IP") #endif #if HAVE_DECL_CURLINFO_LOCAL_IP case 33: /* CURLINFO_LOCAL_IP */ resultType = StringValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_LOCAL_IP, &strValue); break; #else #pragma message("libcurl does not provide CURLINFO_LOCAL_IP") #endif #if HAVE_DECL_CURLINFO_LOCAL_PORT case 34: /* CURLINFO_LOCAL_PORT */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_LOCAL_PORT, &longValue); break; #else #pragma message("libcurl does not provide CURLINFO_LOCAL_PORT") #endif #if HAVE_DECL_CURLINFO_CONDITION_UNMET case 35: /* CURLINFO_CONDITION_UNMET */ resultType = LongValue; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_CONDITION_UNMET, &longValue); break; #else #pragma message("libcurl does not provide CURLINFO_CONDITION_UNMET") #endif #if HAVE_DECL_CURLINFO_CERTINFO case 36: /* CURLINFO_CERTINFO */ resultType = StringListListValue; ptr.to_info = NULL; curlResult = curl_easy_getinfo(connection->handle, CURLINFO_CERTINFO, &ptr.to_info); result = Val_emptylist; current = Val_emptylist; next = Val_emptylist; if (curlResult != CURLE_OK || !ptr.to_info) break; for (i = 0; i < ptr.to_certinfo->num_of_certs; i++) { next = caml_alloc_tuple(2); Store_field(next, 0, convertStringList(ptr.to_certinfo->certinfo[i])); Store_field(next, 1, current); current = next; } break; #else #pragma message("libcurl does not provide CURLINFO_CERTINFO") #endif default: caml_failwith("Invalid CURLINFO Option"); break; } if (curlResult != CURLE_OK) raiseError(connection, curlResult); switch (resultType) { case StringValue: result = caml_alloc(1, StringValue); Store_field(result, 0, caml_copy_string(strValue?strValue:"")); break; case LongValue: result = caml_alloc(1, LongValue); Store_field(result, 0, Val_long(longValue)); break; case DoubleValue: result = caml_alloc(1, DoubleValue); Store_field(result, 0, caml_copy_double(doubleValue)); break; case StringListValue: result = caml_alloc(1, StringListValue); Store_field(result, 0, convertStringList(stringListValue)); curl_slist_free_all(stringListValue); break; case StringListListValue: result = caml_alloc(1, StringListListValue); Store_field(result, 0, current); break; case OCamlValue: break; } CAMLreturn(result); } /** ** curl_escape helper function **/ value caml_curl_escape(value str) { CAMLparam1(str); CAMLlocal1(result); char *curlResult; curlResult = curl_escape(String_val(str), caml_string_length(str)); result = caml_copy_string(curlResult); free(curlResult); CAMLreturn(result); } /** ** curl_unescape helper function **/ value caml_curl_unescape(value str) { CAMLparam1(str); CAMLlocal1(result); char *curlResult; curlResult = curl_unescape(String_val(str), caml_string_length(str)); result = caml_copy_string(curlResult); free(curlResult); CAMLreturn(result); } /** ** curl_getdate helper function **/ value caml_curl_getdate(value str, value now) { CAMLparam2(str, now); CAMLlocal1(result); time_t curlResult; time_t curlNow; curlNow = (time_t)Double_val(now); curlResult = curl_getdate(String_val(str), &curlNow); result = caml_copy_double((double)curlResult); CAMLreturn(result); } /** ** curl_version helper function **/ value caml_curl_version(void) { CAMLparam0(); CAMLlocal1(result); char *str; str = curl_version(); result = caml_copy_string(str); CAMLreturn(result); } struct CURLVersionBitsMapping { int code; char *name; }; struct CURLVersionBitsMapping versionBitsMap[] = { {CURL_VERSION_IPV6, "ipv6"}, {CURL_VERSION_KERBEROS4, "kerberos4"}, {CURL_VERSION_SSL, "ssl"}, {CURL_VERSION_LIBZ, "libz"}, {CURL_VERSION_NTLM, "ntlm"}, {CURL_VERSION_GSSNEGOTIATE, "gssnegotiate"}, {CURL_VERSION_DEBUG, "debug"}, {CURL_VERSION_CURLDEBUG, "curldebug"}, {CURL_VERSION_ASYNCHDNS, "asynchdns"}, {CURL_VERSION_SPNEGO, "spnego"}, {CURL_VERSION_LARGEFILE, "largefile"}, {CURL_VERSION_IDN, "idn"}, {CURL_VERSION_SSPI, "sspi"}, {CURL_VERSION_CONV, "conv"}, #if HAVE_DECL_CURL_VERSION_TLSAUTH_SRP {CURL_VERSION_TLSAUTH_SRP, "srp"}, #endif #if HAVE_DECL_CURL_VERSION_NTLM_WB {CURL_VERSION_NTLM_WB, "wb"}, #endif }; value caml_curl_version_info(value unit) { CAMLparam1(unit); CAMLlocal4(v, vlist, vnum, vfeatures); const char* const* p = NULL; size_t i = 0; curl_version_info_data* data = curl_version_info(CURLVERSION_NOW); if (NULL == data) caml_failwith("curl_version_info"); vlist = Val_emptylist; for (p = data->protocols; NULL != *p; p++) { vlist = Val_cons(vlist, caml_copy_string(*p)); } vfeatures = Val_emptylist; for (i = 0; i < sizeof(versionBitsMap)/sizeof(versionBitsMap[0]); i++) { if (0 != (versionBitsMap[i].code & data->features)) vfeatures = Val_cons(vfeatures, caml_copy_string(versionBitsMap[i].name)); } vnum = caml_alloc_tuple(3); Store_field(vnum,0,Val_int(0xFF & (data->version_num >> 16))); Store_field(vnum,1,Val_int(0xFF & (data->version_num >> 8))); Store_field(vnum,2,Val_int(0xFF & (data->version_num))); v = caml_alloc_tuple(12); Store_field(v,0,caml_copy_string(data->version)); Store_field(v,1,vnum); Store_field(v,2,caml_copy_string(data->host)); Store_field(v,3,vfeatures); Store_field(v,4,data->ssl_version ? Val_some(caml_copy_string(data->ssl_version)) : Val_none); Store_field(v,5,data->libz_version ? Val_some(caml_copy_string(data->libz_version)) : Val_none); Store_field(v,6,vlist); Store_field(v,7,caml_copy_string((data->age >= 1 && data->ares) ? data->ares : "")); Store_field(v,8,Val_int((data->age >= 1) ? data->ares_num : 0)); Store_field(v,9,caml_copy_string((data->age >= 2 && data->libidn) ? data->libidn : "")); Store_field(v,10,Val_int((data->age >= 3) ? data->iconv_ver_num : 0)); Store_field(v,11,caml_copy_string((data->age >= 3 && data->libssh_version) ? data->libssh_version : "")); CAMLreturn(v); } value caml_curl_pause(value conn, value opts) { CAMLparam2(conn, opts); CAMLlocal4(v, vlist, vnum, vfeatures); Connection *connection = Connection_val(conn); int bitmask = 0; CURLcode result; while (Val_emptylist != opts) { switch (Int_val(Field(opts,0))) { case 0: bitmask |= CURLPAUSE_SEND; break; case 1: bitmask |= CURLPAUSE_RECV; break; case 2: bitmask |= CURLPAUSE_ALL; break; default: caml_failwith("wrong pauseOption"); } opts = Field(opts,1); } caml_enter_blocking_section(); result = curl_easy_pause(connection->handle,bitmask); caml_leave_blocking_section(); if (result != CURLE_OK) raiseError(connection, result); CAMLreturn(Val_unit); } /* * Curl multi stack support * * Exported thin wrappers for libcurl are prefixed with caml_curl_multi_. * Other exported functions are prefixed with caml_curlm_, some of them * can/should be decomposed into smaller parts. */ struct ml_multi_handle { CURLM* handle; value values; /* callbacks */ }; enum { curlmopt_socket_function, curlmopt_timer_function, /* last, not used */ multi_values_total }; typedef struct ml_multi_handle ml_multi_handle; #define Multi_val(v) (*(ml_multi_handle**)Data_custom_val(v)) #define CURLM_val(v) (Multi_val(v)->handle) static struct custom_operations curl_multi_ops = { "ygrek.curl_multi", custom_finalize_default, custom_compare_default, custom_hash_default, custom_serialize_default, custom_deserialize_default, #if defined(custom_compare_ext_default) custom_compare_ext_default, #endif }; value caml_curl_multi_init(value unit) { CAMLparam1(unit); CAMLlocal1(v); ml_multi_handle* multi = (ml_multi_handle*)caml_stat_alloc(sizeof(ml_multi_handle)); CURLM* h = curl_multi_init(); if (!h) { caml_stat_free(multi); caml_failwith("caml_curl_multi_init"); } multi->handle = h; multi->values = caml_alloc(multi_values_total, 0); caml_register_generational_global_root(&multi->values); v = caml_alloc_custom(&curl_multi_ops, sizeof(ml_multi_handle*), 0, 1); Multi_val(v) = multi; CAMLreturn(v); } value caml_curl_multi_cleanup(value handle) { CAMLparam1(handle); ml_multi_handle* h = Multi_val(handle); if (NULL == h) CAMLreturn(Val_unit); caml_remove_generational_global_root(&h->values); if (CURLM_OK != curl_multi_cleanup(h->handle)) caml_failwith("caml_curl_multi_cleanup"); caml_stat_free(h); Multi_val(handle) = (ml_multi_handle*)NULL; CAMLreturn(Val_unit); } static CURL* curlm_remove_finished(CURLM* multi_handle, CURLcode* result) { int msgs_in_queue = 0; while (1) { CURLMsg* msg = curl_multi_info_read(multi_handle, &msgs_in_queue); if (NULL == msg) return NULL; if (CURLMSG_DONE == msg->msg) { CURL* easy_handle = msg->easy_handle; if (result) *result = msg->data.result; if (CURLM_OK != curl_multi_remove_handle(multi_handle, easy_handle)) { /*caml_failwith("curlm_remove_finished");*/ } return easy_handle; } } } value caml_curlm_remove_finished(value v_multi) { CAMLparam1(v_multi); CAMLlocal2(v_easy, v_tuple); CURL* handle; CURLM* multi_handle; CURLcode result; Connection* conn = NULL; multi_handle = CURLM_val(v_multi); caml_enter_blocking_section(); handle = curlm_remove_finished(multi_handle,&result); caml_leave_blocking_section(); if (NULL == handle) { CAMLreturn(Val_none); } else { conn = getConnection(handle); if (conn->curl_ERRORBUFFER != NULL) { Store_field(Field(conn->ocamlValues, Ocaml_ERRORBUFFER), 0, caml_copy_string(conn->curl_ERRORBUFFER)); } conn->refcount--; /* NB: same handle, but different block */ v_easy = caml_curl_alloc(conn); v_tuple = caml_alloc(2, 0); Store_field(v_tuple,0,v_easy); Store_field(v_tuple,1,Val_int(result)); /* CURLcode */ CAMLreturn(Val_some(v_tuple)); } } value caml_curl_multi_wait(value v_timeout_ms, value v_multi) { CAMLparam2(v_timeout_ms,v_multi); CURLM *multi_handle = CURLM_val(v_multi); int timeout_ms = Int_val(v_timeout_ms); int numfds = -1; CURLMcode ret; caml_enter_blocking_section(); ret = curl_multi_wait(multi_handle, NULL, 0, timeout_ms, &numfds); caml_leave_blocking_section(); if (ret != CURLM_OK) caml_failwith("caml_curl_multi_wait"); CAMLreturn(Val_bool(numfds != 0)); } value caml_curl_multi_add_handle(value v_multi, value v_easy) { CAMLparam2(v_multi,v_easy); CURLM* multi = CURLM_val(v_multi); Connection* conn = Connection_val(v_easy); /* prevent collection of OCaml value while the easy handle is used and may invoke callbacks registered on OCaml side */ conn->refcount++; /* may invoke callbacks so need to be consistent with locks */ caml_enter_blocking_section(); if (CURLM_OK != curl_multi_add_handle(multi, conn->handle)) { conn->refcount--; /* not added, revert */ caml_leave_blocking_section(); caml_failwith("caml_curl_multi_add_handle"); } caml_leave_blocking_section(); CAMLreturn(Val_unit); } value caml_curl_multi_remove_handle(value v_multi, value v_easy) { CAMLparam2(v_multi,v_easy); CURLM* multi = CURLM_val(v_multi); Connection* conn = Connection_val(v_easy); /* may invoke callbacks so need to be consistent with locks */ caml_enter_blocking_section(); if (CURLM_OK != curl_multi_remove_handle(multi, conn->handle)) { caml_leave_blocking_section(); caml_failwith("caml_curl_multi_remove_handle"); } conn->refcount--; caml_leave_blocking_section(); CAMLreturn(Val_unit); } value caml_curl_multi_perform_all(value v_multi) { CAMLparam1(v_multi); int still_running = 0; CURLM* h = CURLM_val(v_multi); caml_enter_blocking_section(); while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(h, &still_running)); caml_leave_blocking_section(); CAMLreturn(Val_int(still_running)); } /* currently curlCode repr tag matches CURLE_ value * this is exploited below, but generally should use errorMap */ value caml_curl_strerror(value v_code) { CAMLparam1(v_code); CAMLreturn(caml_copy_string(curl_easy_strerror((CURLcode)Int_val(v_code)))); } value caml_curl_int_of_curlCode(value v_code) { return v_code; } value caml_curl_curlCode_of_int(value v) { return (Int_val(v) < sizeof(errorMap) / sizeof(errorMap[0]) ? Val_some(v) : Val_none); } /* * Wrappers for the curl_multi_socket_action infrastructure * Based on curl hiperfifo.c example */ #ifdef _WIN32 #ifndef Val_socket #define Val_socket(v) win_alloc_socket(v) #endif #ifndef Socket_val #error Socket_val not defined in unixsupport.h #endif #else /* _WIN32 */ #ifndef Socket_val #define Socket_val(v) Long_val(v) #endif #ifndef Val_socket #define Val_socket(v) Val_int(v) #endif #endif /* _WIN32 */ static void raise_multi_error(char const* msg) { static const value* exception = NULL; if (NULL == exception) { exception = caml_named_value("Curl.Multi.Error"); if (NULL == exception) caml_invalid_argument("Curl.Multi.Error"); } caml_raise_with_string(*exception, msg); } static void check_mcode(CURLMcode code) { char const *s = NULL; switch (code) { case CURLM_OK : return; case CURLM_CALL_MULTI_PERFORM : s="CURLM_CALL_MULTI_PERFORM"; break; case CURLM_BAD_HANDLE : s="CURLM_BAD_HANDLE"; break; case CURLM_BAD_EASY_HANDLE : s="CURLM_BAD_EASY_HANDLE"; break; case CURLM_OUT_OF_MEMORY : s="CURLM_OUT_OF_MEMORY"; break; case CURLM_INTERNAL_ERROR : s="CURLM_INTERNAL_ERROR"; break; case CURLM_UNKNOWN_OPTION : s="CURLM_UNKNOWN_OPTION"; break; case CURLM_LAST : s="CURLM_LAST"; break; case CURLM_BAD_SOCKET : s="CURLM_BAD_SOCKET"; break; default : s="CURLM_unknown"; break; } raise_multi_error(s); } value caml_curl_multi_socket_action(value v_multi, value v_fd, value v_kind) { CAMLparam3(v_multi, v_fd, v_kind); CURLM* h = CURLM_val(v_multi); int still_running = 0; CURLMcode rc = CURLM_OK; curl_socket_t socket; int kind = 0; if (Val_none == v_fd) { socket = CURL_SOCKET_TIMEOUT; } else { socket = Socket_val(Field(v_fd, 0)); } switch (Int_val(v_kind)) { case 0 : break; case 1 : kind |= CURL_CSELECT_IN; break; case 2 : kind |= CURL_CSELECT_OUT; break; case 3 : kind |= CURL_CSELECT_IN | CURL_CSELECT_OUT; break; default: raise_multi_error("caml_curl_multi_socket_action"); } /* fprintf(stdout,"fd %u kind %u\n",socket, kind); fflush(stdout); */ caml_enter_blocking_section(); do { rc = curl_multi_socket_action(h, socket, kind, &still_running); } while (rc == CURLM_CALL_MULTI_PERFORM); caml_leave_blocking_section(); check_mcode(rc); CAMLreturn(Val_int(still_running)); } value caml_curl_multi_socket_all(value v_multi) { CAMLparam1(v_multi); int still_running = 0; CURLMcode rc = CURLM_OK; CURLM* h = CURLM_val(v_multi); caml_enter_blocking_section(); do { rc = curl_multi_socket_all(h, &still_running); } while (rc == CURLM_CALL_MULTI_PERFORM); caml_leave_blocking_section(); check_mcode(rc); CAMLreturn(Val_int(still_running)); } static int curlm_sock_cb(CURL *e, curl_socket_t sock, int what, void *cbp, void *sockp) { caml_leave_blocking_section(); CAMLparam0(); CAMLlocal2(v_what,csock); (void)e; (void)sockp; /* not used */ /* v_what = Val_int(what); */ switch (what) { case CURL_POLL_NONE : v_what = Val_int(0); break; case CURL_POLL_IN : v_what = Val_int(1); break; case CURL_POLL_OUT : v_what = Val_int(2); break; case CURL_POLL_INOUT : v_what = Val_int(3); break; case CURL_POLL_REMOVE : v_what = Val_int(4); break; default: fprintf(stderr, "curlm_sock_cb sock=%lld what=%d\n", (long long)sock, what); fflush(stderr); raise_multi_error("curlm_sock_cb"); /* FIXME exception from callback */ } csock=Val_socket(sock); caml_callback2(Field(((ml_multi_handle*)cbp)->values,curlmopt_socket_function), csock, v_what); CAMLdrop; caml_enter_blocking_section(); return 0; } value caml_curl_multi_socketfunction(value v_multi, value v_cb) { CAMLparam2(v_multi, v_cb); ml_multi_handle* multi = Multi_val(v_multi); Store_field(multi->values, curlmopt_socket_function, v_cb); curl_multi_setopt(multi->handle, CURLMOPT_SOCKETFUNCTION, curlm_sock_cb); curl_multi_setopt(multi->handle, CURLMOPT_SOCKETDATA, multi); CAMLreturn(Val_unit); } static int curlm_timer_cb(CURLM *multi, long timeout_ms, void *userp) { caml_leave_blocking_section(); CAMLparam0(); (void)multi; caml_callback(Field(((ml_multi_handle*)userp)->values,curlmopt_timer_function), Val_long(timeout_ms)); CAMLdrop; caml_enter_blocking_section(); return 0; } value caml_curl_multi_timerfunction(value v_multi, value v_cb) { CAMLparam2(v_multi, v_cb); ml_multi_handle* multi = Multi_val(v_multi); Store_field(multi->values, curlmopt_timer_function, v_cb); curl_multi_setopt(multi->handle, CURLMOPT_TIMERFUNCTION, curlm_timer_cb); curl_multi_setopt(multi->handle, CURLMOPT_TIMERDATA, multi); CAMLreturn(Val_unit); } value caml_curl_multi_timeout(value v_multi) { CAMLparam1(v_multi); long ms = 0; CURLMcode rc = CURLM_OK; ml_multi_handle* multi = Multi_val(v_multi); rc = curl_multi_timeout(multi->handle, &ms); check_mcode(rc); CAMLreturn(Val_long(ms)); } #define SETMOPT_VAL_(func_name, curl_option, conv_val) \ static void func_name(CURLM *handle, value option) \ { \ CAMLparam1(option); \ CURLMcode result = CURLM_OK; \ \ result = curl_multi_setopt(handle, curl_option, conv_val(option)); \ \ check_mcode(result); \ \ CAMLreturn0; \ } #define SETMOPT_VAL(name, conv) SETMOPT_VAL_(handle_multi_##name, CURLMOPT_##name, conv) #define SETMOPT_BOOL(name) SETMOPT_VAL(name, Bool_val) #define SETMOPT_LONG(name) SETMOPT_VAL(name, Long_val) #define SETMOPT_INT64(name) SETMOPT_VAL(name, Int64_val) long pipeliningMap[] = { 0, /* CURLPIPE_NOTHING */ 1, /* CURLPIPE_HTTP1 */ 2, /* CURLPIPE_MULTIPLEX */ }; static void handle_multi_PIPELINING(CURLM* handle, value option) { CAMLparam1(option); CURLMcode result = CURLM_OK; long bits = convert_bit_list(pipeliningMap, sizeof(pipeliningMap) / sizeof(pipeliningMap[0]), option); result = curl_multi_setopt(handle, CURLMOPT_PIPELINING, bits); check_mcode(result); CAMLreturn0; } #if HAVE_DECL_CURLMOPT_MAXCONNECTS SETMOPT_LONG( MAXCONNECTS) #endif #if HAVE_DECL_CURLMOPT_MAX_PIPELINE_LENGTH SETMOPT_LONG( MAX_PIPELINE_LENGTH) #endif #if HAVE_DECL_CURLMOPT_MAX_HOST_CONNECTIONS SETMOPT_LONG( MAX_HOST_CONNECTIONS) #endif typedef struct CURLMOptionMapping CURLMOptionMapping; #define OPT(name) { handle_multi_## name, "CURLMOPT_"#name} #define NO_OPT(name) { NULL, "CURLMOPT_"#name} struct CURLMOptionMapping { void (*optionHandler)(CURLM *, value); char *name; }; CURLMOptionMapping implementedMOptionMap[] = { OPT( PIPELINING), #if HAVE_DECL_CURLMOPT_MAXCONNECTS OPT( MAXCONNECTS), #else NO_OPT( MAXCONNECTS), #endif #if HAVE_DECL_CURLMOPT_MAX_PIPELINE_LENGTH OPT( MAX_PIPELINE_LENGTH), #else NO_OPT( MAX_PIPELINE_LENGTH), #endif #if HAVE_DECL_CURLMOPT_MAX_HOST_CONNECTIONS OPT( MAX_HOST_CONNECTIONS), #else NO_OPT( MAX_HOST_CONNECTIONS), #endif }; value caml_curl_multi_setopt(value v_multi, value option) { CAMLparam2(v_multi, option); CAMLlocal1(data); CURLM *handle = Multi_val(v_multi)->handle; CURLMOptionMapping* thisOption = NULL; static const value* exception = NULL; data = Field(option, 0); if (Tag_val(option) < sizeof(implementedMOptionMap)/sizeof(CURLMOptionMapping)) { thisOption = &implementedMOptionMap[Tag_val(option)]; if (thisOption->optionHandler) { thisOption->optionHandler(handle, data); } else { if (NULL == exception) { exception = caml_named_value("Curl.NotImplemented"); if (NULL == exception) caml_invalid_argument("Curl.NotImplemented"); } caml_raise_with_string(*exception, thisOption->name); } } else { caml_failwith("Invalid CURLMOPT Option"); } CAMLreturn(Val_unit); } struct used_enum { int last_used; int last; char const* name; }; #define CURL_ENUM(name,last_used) { CURL_ ## name ## _ ## last_used, CURL_ ## name ## _LAST, #name } struct used_enum check_enums[] = { { CURLINFO_SSL_DATA_OUT, CURLINFO_END, "DEBUGFUNCTION curl_infotype" }, #if HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE CURL_ENUM(HTTP_VERSION, 2_PRIOR_KNOWLEDGE), #endif #if HAVE_DECL_CURLINFO_CERTINFO { CURLINFO_CERTINFO & CURLINFO_MASK, CURLINFO_LASTONE, "CURLINFO" }, #endif #if HAVE_DECL_CURLE_AGAIN { CURLE_AGAIN, CURL_LAST, "CURLcode" } #endif }; value caml_curl_check_enums(value v_unit) { CAMLparam0(); CAMLlocal2(v_r,v); size_t i; size_t len = sizeof(check_enums) / sizeof(struct used_enum); v_r = caml_alloc_tuple(len); for (i = 0; i < len; i++) { v = caml_alloc_tuple(3); Store_field(v, 0, Val_int(check_enums[i].last_used)); Store_field(v, 1, Val_int(check_enums[i].last)); Store_field(v, 2, caml_copy_string(check_enums[i].name)); Store_field(v_r, i, v); } CAMLreturn(v_r); } #ifdef __cplusplus } #endif ocurl-0.9.0/curl.ml000066400000000000000000001252661356304035200141600ustar00rootroot00000000000000(* * curl.ml * * Copyright (c) 2003-2008, Lars Nilsson, * Copyright (c) 2009, ygrek, *) type t type curlCode = | CURLE_OK | CURLE_UNSUPPORTED_PROTOCOL | CURLE_FAILED_INIT | CURLE_URL_MALFORMAT | CURLE_URL_MALFORMAT_USER | CURLE_COULDNT_RESOLVE_PROXY | CURLE_COULDNT_RESOLVE_HOST | CURLE_COULDNT_CONNECT | CURLE_FTP_WEIRD_SERVER_REPLY | CURLE_FTP_ACCESS_DENIED | CURLE_FTP_USER_PASSWORD_INCORRECT | CURLE_FTP_WEIRD_PASS_REPLY | CURLE_FTP_WEIRD_USER_REPLY | CURLE_FTP_WEIRD_PASV_REPLY | CURLE_FTP_WEIRD_227_FORMAT | CURLE_FTP_CANT_GET_HOST | CURLE_FTP_CANT_RECONNECT | CURLE_FTP_COULDNT_SET_BINARY | CURLE_PARTIAL_FILE | CURLE_FTP_COULDNT_RETR_FILE | CURLE_FTP_WRITE_ERROR | CURLE_FTP_QUOTE_ERROR | CURLE_HTTP_NOT_FOUND | CURLE_WRITE_ERROR | CURLE_MALFORMAT_USER | CURLE_FTP_COULDNT_STOR_FILE | CURLE_READ_ERROR | CURLE_OUT_OF_MEMORY | CURLE_OPERATION_TIMEOUTED | CURLE_FTP_COULDNT_SET_ASCII | CURLE_FTP_PORT_FAILED | CURLE_FTP_COULDNT_USE_REST | CURLE_FTP_COULDNT_GET_SIZE | CURLE_HTTP_RANGE_ERROR | CURLE_HTTP_POST_ERROR | CURLE_SSL_CONNECT_ERROR | CURLE_FTP_BAD_DOWNLOAD_RESUME | CURLE_FILE_COULDNT_READ_FILE | CURLE_LDAP_CANNOT_BIND | CURLE_LDAP_SEARCH_FAILED | CURLE_LIBRARY_NOT_FOUND | CURLE_FUNCTION_NOT_FOUND | CURLE_ABORTED_BY_CALLBACK | CURLE_BAD_FUNCTION_ARGUMENT | CURLE_BAD_CALLING_ORDER | CURLE_HTTP_PORT_FAILED | CURLE_BAD_PASSWORD_ENTERED | CURLE_TOO_MANY_REDIRECTS | CURLE_UNKNOWN_TELNET_OPTION | CURLE_TELNET_OPTION_SYNTAX | CURLE_OBSOLETE | CURLE_SSL_PEER_CERTIFICATE | CURLE_GOT_NOTHING | CURLE_SSL_ENGINE_NOTFOUND | CURLE_SSL_ENGINE_SETFAILED | CURLE_SEND_ERROR | CURLE_RECV_ERROR | CURLE_SHARE_IN_USE | CURLE_SSL_CERTPROBLEM | CURLE_SSL_CIPHER | CURLE_SSL_CACERT | CURLE_BAD_CONTENT_ENCODING | CURLE_LDAP_INVALID_URL | CURLE_FILESIZE_EXCEEDED | CURLE_USE_SSL_FAILED | CURLE_SEND_FAIL_REWIND | CURLE_SSL_ENGINE_INITFAILED | CURLE_LOGIN_DENIED | CURLE_TFTP_NOTFOUND | CURLE_TFTP_PERM | CURLE_REMOTE_DISK_FULL | CURLE_TFTP_ILLEGAL | CURLE_TFTP_UNKNOWNID | CURLE_REMOTE_FILE_EXISTS | CURLE_TFTP_NOSUCHUSER | CURLE_CONV_FAILED | CURLE_CONV_REQD | CURLE_SSL_CACERT_BADFILE | CURLE_REMOTE_FILE_NOT_FOUND | CURLE_SSH | CURLE_SSL_SHUTDOWN_FAILED | CURLE_AGAIN exception CurlException of (curlCode * int * string) type curlNETRCOption = | CURL_NETRC_OPTIONAL | CURL_NETRC_IGNORED | CURL_NETRC_REQUIRED type curlEncoding = | CURL_ENCODING_NONE | CURL_ENCODING_DEFLATE | CURL_ENCODING_GZIP | CURL_ENCODING_ANY type curlContentType = | DEFAULT | CONTENTTYPE of string type curlHTTPPost = | CURLFORM_CONTENT of string * string * curlContentType | CURLFORM_FILECONTENT of string * string * curlContentType | CURLFORM_FILE of string * string * curlContentType | CURLFORM_BUFFER of string * string * string * curlContentType (* type curlHTTPPost = | CURLFORM_COPYNAME of string | CURLFORM_PTRNAME of string | CURLFORM_NAMELENGTH of int | CURLFORM_COPYCONTENTS of string | CURLFORM_PTRCONTENTS of string | CURLFORM_FILE of string | CURLFORM_FILECONTENT of string | CURLFORM_CONTENTSLENGTH of int | CURLFORM_CONTENTTYPE of string *) type curlSSLVersion = | SSLVERSION_DEFAULT | SSLVERSION_TLSv1 | SSLVERSION_SSLv2 | SSLVERSION_SSLv3 | SSLVERSION_TLSv1_0 | SSLVERSION_TLSv1_1 | SSLVERSION_TLSv1_2 | SSLVERSION_TLSv1_3 type curlTimeCondition = | TIMECOND_NONE | TIMECOND_IFMODSINCE | TIMECOND_IFUNMODSINCE | TIMECOND_LASTMOD type curlKRB4Level = | KRB4_NONE | KRB4_CLEAR | KRB4_SAFE | KRB4_CONFIDENTIAL | KRB4_PRIVATE type curlClosePolicy = | CLOSEPOLICY_OLDEST | CLOSEPOLICY_LEAST_RECENTLY_USED type curlSSLVerifyHost = | SSLVERIFYHOST_NONE | SSLVERIFYHOST_EXISTENCE | SSLVERIFYHOST_HOSTNAME type curlHTTPVersion = | HTTP_VERSION_NONE | HTTP_VERSION_1_0 | HTTP_VERSION_1_1 | HTTP_VERSION_2 | HTTP_VERSION_2TLS | HTTP_VERSION_2_PRIOR_KNOWLEDGE type curlDebugType = | DEBUGTYPE_TEXT | DEBUGTYPE_HEADER_IN | DEBUGTYPE_HEADER_OUT | DEBUGTYPE_DATA_IN | DEBUGTYPE_DATA_OUT | DEBUGTYPE_SSL_DATA_IN | DEBUGTYPE_SSL_DATA_OUT | DEBUGTYPE_END type curlAuth = | CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM | CURLAUTH_ANY | CURLAUTH_ANYSAFE type curlIPResolve = | IPRESOLVE_WHATEVER | IPRESOLVE_V4 | IPRESOLVE_V6 type curlFTPSSL = | FTPSSL_NONE | FTPSSL_TRY | FTPSSL_CONTROL | FTPSSL_ALL type curlFTPSSLAuth = | FTPAUTH_DEFAULT | FTPAUTH_SSL | FTPAUTH_TLS type curlIOCmd = | IOCMD_NOP | IOCMD_RESTARTREAD type curlIOErr = | IOE_OK | IOE_UNKNOWNCMD | IOE_FAILRESTART type curlSeekResult = | SEEKFUNC_OK | SEEKFUNC_FAIL | SEEKFUNC_CANTSEEK type curlFTPMethod = | FTPMETHOD_DEFAULT | FTPMETHOD_MULTICWD | FTPMETHOD_NOCWD | FTPMETHOD_SINGLECWD type curlSSHAuthTypes = | SSHAUTH_ANY | SSHAUTH_PUBLICKEY | SSHAUTH_PASSWORD | SSHAUTH_HOST | SSHAUTH_KEYBOARD type curlFTPSSLCCC = | FTPSSL_CCC_NONE | FTPSSL_CCC_PASSIVE | FTPSSL_CCC_ACTIVE type curlSeek = | SEEK_SET | SEEK_CUR | SEEK_END type curlProxyType = | CURLPROXY_HTTP | CURLPROXY_HTTP_1_0 (** added in 7.19.4 *) | CURLPROXY_SOCKS4 (** added in 7.15.2 *) | CURLPROXY_SOCKS5 | CURLPROXY_SOCKS4A (** added in 7.18.0 *) | CURLPROXY_SOCKS5_HOSTNAME (** added in 7.18.0 *) type curlMIMEPartData = | CURLMIME_DATA of string | CURLMIME_FILEDATA of string type curlMIMEEncoding = | CURLMIME_8BIT | CURLMIME_BINARY | CURLMIME_7BIT | CURLMIME_QUOTEDPRINTABLE | CURLMIME_BASE64 | CURLMIME_NONE type curlMIMEPart = { encoding: curlMIMEEncoding; headers: string list; subparts: curlMIMEPart list; data: curlMIMEPartData; } type curlKHMatch = | CURLKHMATCH_OK | CURLKHMATCH_MISMATCH of string | CURLKHMATCH_MISSING type curlKHStat = | CURLKHSTAT_FINE_ADD_TO_FILE | CURLKHSTAT_FINE | CURLKHSTAT_REJECT | CURLKHSTAT_DEFER (** Protocols to enable (via CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS) *) type curlProto = | CURLPROTO_ALL (** enable everything *) | CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | CURLPROTO_FTPS | CURLPROTO_SCP | CURLPROTO_SFTP | CURLPROTO_TELNET | CURLPROTO_LDAP | CURLPROTO_LDAPS | CURLPROTO_DICT | CURLPROTO_FILE | CURLPROTO_TFTP | CURLPROTO_IMAP | CURLPROTO_IMAPS | CURLPROTO_POP3 | CURLPROTO_POP3S | CURLPROTO_SMTP | CURLPROTO_SMTPS | CURLPROTO_RTSP | CURLPROTO_RTMP | CURLPROTO_RTMPT | CURLPROTO_RTMPE | CURLPROTO_RTMPTE | CURLPROTO_RTMPS | CURLPROTO_RTMPTS | CURLPROTO_GOPHER (* sync curlPostRedir_table *) type curlPostRedir = | REDIR_POST_ALL | REDIR_POST_301 | REDIR_POST_302 | REDIR_POST_303 type curlOption = | CURLOPT_WRITEFUNCTION of (string -> int) | CURLOPT_READFUNCTION of (int -> string) | CURLOPT_INFILESIZE of int | CURLOPT_URL of string | CURLOPT_PROXY of string | CURLOPT_PROXYPORT of int | CURLOPT_HTTPPROXYTUNNEL of bool | CURLOPT_VERBOSE of bool | CURLOPT_HEADER of bool | CURLOPT_NOPROGRESS of bool | CURLOPT_NOSIGNAL of bool | CURLOPT_NOBODY of bool | CURLOPT_FAILONERROR of bool | CURLOPT_UPLOAD of bool | CURLOPT_POST of bool | CURLOPT_FTPLISTONLY of bool | CURLOPT_FTPAPPEND of bool | CURLOPT_NETRC of curlNETRCOption | CURLOPT_ENCODING of curlEncoding | CURLOPT_FOLLOWLOCATION of bool | CURLOPT_TRANSFERTEXT of bool | CURLOPT_PUT of bool | CURLOPT_USERPWD of string | CURLOPT_PROXYUSERPWD of string | CURLOPT_RANGE of string | CURLOPT_ERRORBUFFER of string ref | CURLOPT_TIMEOUT of int | CURLOPT_POSTFIELDS of string | CURLOPT_POSTFIELDSIZE of int | CURLOPT_REFERER of string | CURLOPT_USERAGENT of string | CURLOPT_FTPPORT of string | CURLOPT_LOWSPEEDLIMIT of int | CURLOPT_LOWSPEEDTIME of int | CURLOPT_RESUMEFROM of int | CURLOPT_COOKIE of string | CURLOPT_HTTPHEADER of string list | CURLOPT_HTTPPOST of curlHTTPPost list | CURLOPT_SSLCERT of string | CURLOPT_SSLCERTTYPE of string | CURLOPT_SSLCERTPASSWD of string | CURLOPT_SSLKEY of string | CURLOPT_SSLKEYTYPE of string | CURLOPT_SSLKEYPASSWD of string | CURLOPT_SSLENGINE of string | CURLOPT_SSLENGINEDEFAULT of bool | CURLOPT_CRLF of bool | CURLOPT_QUOTE of string list | CURLOPT_POSTQUOTE of string list | CURLOPT_HEADERFUNCTION of (string -> int) | CURLOPT_COOKIEFILE of string | CURLOPT_SSLVERSION of curlSSLVersion | CURLOPT_TIMECONDITION of curlTimeCondition | CURLOPT_TIMEVALUE of int32 | CURLOPT_CUSTOMREQUEST of string | CURLOPT_INTERFACE of string | CURLOPT_KRB4LEVEL of curlKRB4Level | CURLOPT_PROGRESSFUNCTION of (float -> float -> float -> float -> bool) | CURLOPT_SSLVERIFYPEER of bool | CURLOPT_CAINFO of string | CURLOPT_CAPATH of string | CURLOPT_FILETIME of bool | CURLOPT_MAXREDIRS of int | CURLOPT_MAXCONNECTS of int | CURLOPT_CLOSEPOLICY of curlClosePolicy | CURLOPT_FRESHCONNECT of bool | CURLOPT_FORBIDREUSE of bool | CURLOPT_RANDOMFILE of string | CURLOPT_EGDSOCKET of string | CURLOPT_CONNECTTIMEOUT of int | CURLOPT_HTTPGET of bool | CURLOPT_SSLVERIFYHOST of curlSSLVerifyHost | CURLOPT_COOKIEJAR of string | CURLOPT_SSLCIPHERLIST of string | CURLOPT_HTTPVERSION of curlHTTPVersion | CURLOPT_FTPUSEEPSV of bool | CURLOPT_DNSCACHETIMEOUT of int | CURLOPT_DNSUSEGLOBALCACHE of bool | CURLOPT_DEBUGFUNCTION of (t -> curlDebugType -> string -> unit) | CURLOPT_PRIVATE of string | CURLOPT_HTTP200ALIASES of string list | CURLOPT_UNRESTRICTEDAUTH of bool | CURLOPT_FTPUSEEPRT of bool | CURLOPT_HTTPAUTH of curlAuth list | CURLOPT_FTPCREATEMISSINGDIRS of bool | CURLOPT_PROXYAUTH of curlAuth list | CURLOPT_FTPRESPONSETIMEOUT of int | CURLOPT_IPRESOLVE of curlIPResolve | CURLOPT_MAXFILESIZE of int32 | CURLOPT_INFILESIZELARGE of int64 | CURLOPT_RESUMEFROMLARGE of int64 | CURLOPT_MAXFILESIZELARGE of int64 | CURLOPT_NETRCFILE of string | CURLOPT_FTPSSL of curlFTPSSL | CURLOPT_POSTFIELDSIZELARGE of int64 | CURLOPT_TCPNODELAY of bool | CURLOPT_FTPSSLAUTH of curlFTPSSLAuth | CURLOPT_IOCTLFUNCTION of (t -> curlIOCmd -> curlIOErr) | CURLOPT_FTPACCOUNT of string | CURLOPT_COOKIELIST of string | CURLOPT_IGNORECONTENTLENGTH of bool | CURLOPT_FTPSKIPPASVIP of bool | CURLOPT_FTPFILEMETHOD of curlFTPMethod | CURLOPT_LOCALPORT of int | CURLOPT_LOCALPORTRANGE of int | CURLOPT_CONNECTONLY of bool | CURLOPT_MAXSENDSPEEDLARGE of int64 | CURLOPT_MAXRECVSPEEDLARGE of int64 | CURLOPT_FTPALTERNATIVETOUSER of string | CURLOPT_SSLSESSIONIDCACHE of bool | CURLOPT_SSHAUTHTYPES of curlSSHAuthTypes list | CURLOPT_SSHPUBLICKEYFILE of string | CURLOPT_SSHPRIVATEKEYFILE of string | CURLOPT_FTPSSLCCC of curlFTPSSLCCC | CURLOPT_TIMEOUTMS of int | CURLOPT_CONNECTTIMEOUTMS of int | CURLOPT_HTTPTRANSFERDECODING of bool | CURLOPT_HTTPCONTENTDECODING of bool | CURLOPT_NEWFILEPERMS of int | CURLOPT_NEWDIRECTORYPERMS of int | CURLOPT_POST301 of bool | CURLOPT_SSHHOSTPUBLICKEYMD5 of string | CURLOPT_COPYPOSTFIELDS of string | CURLOPT_PROXYTRANSFERMODE of bool | CURLOPT_SEEKFUNCTION of (int64 -> curlSeek -> curlSeekResult) | CURLOPT_AUTOREFERER of bool | CURLOPT_OPENSOCKETFUNCTION of (Unix.file_descr -> unit) | CURLOPT_PROXYTYPE of curlProxyType | CURLOPT_PROTOCOLS of curlProto list | CURLOPT_REDIR_PROTOCOLS of curlProto list | CURLOPT_RESOLVE of string list | CURLOPT_DNS_SERVERS of string | CURLOPT_MAIL_FROM of string | CURLOPT_MAIL_RCPT of string list | CURLOPT_PIPEWAIT of bool | CURLOPT_CERTINFO of bool | CURLOPT_USERNAME of string | CURLOPT_PASSWORD of string | CURLOPT_LOGIN_OPTIONS of string | CURLOPT_CONNECT_TO of string list | CURLOPT_POSTREDIR of curlPostRedir list | CURLOPT_MIMEPOST of curlMIMEPart list | CURLOPT_SSHKNOWNHOSTS of string | CURLOPT_SSHKEYFUNCTION of (curlKHMatch -> string -> curlKHStat) type initOption = | CURLINIT_GLOBALALL | CURLINIT_GLOBALSSL | CURLINIT_GLOBALWIN32 | CURLINIT_GLOBALNOTHING type curlInfo = | CURLINFO_EFFECTIVE_URL | CURLINFO_HTTP_CODE | CURLINFO_RESPONSE_CODE | CURLINFO_TOTAL_TIME | CURLINFO_NAMELOOKUP_TIME | CURLINFO_CONNECT_TIME | CURLINFO_PRETRANSFER_TIME | CURLINFO_SIZE_UPLOAD | CURLINFO_SIZE_DOWNLOAD | CURLINFO_SPEED_DOWNLOAD | CURLINFO_SPEED_UPLOAD | CURLINFO_HEADER_SIZE | CURLINFO_REQUEST_SIZE | CURLINFO_SSL_VERIFYRESULT | CURLINFO_FILETIME | CURLINFO_CONTENT_LENGTH_DOWNLOAD | CURLINFO_CONTENT_LENGTH_UPLOAD | CURLINFO_STARTTRANSFER_TIME | CURLINFO_CONTENT_TYPE | CURLINFO_REDIRECT_TIME | CURLINFO_REDIRECT_COUNT | CURLINFO_PRIVATE | CURLINFO_HTTP_CONNECTCODE | CURLINFO_HTTPAUTH_AVAIL | CURLINFO_PROXYAUTH_AVAIL | CURLINFO_OS_ERRNO | CURLINFO_NUM_CONNECTS | CURLINFO_SSL_ENGINES | CURLINFO_COOKIELIST | CURLINFO_LASTSOCKET | CURLINFO_FTP_ENTRY_PATH | CURLINFO_REDIRECT_URL | CURLINFO_PRIMARY_IP | CURLINFO_LOCAL_IP | CURLINFO_LOCAL_PORT | CURLINFO_CONDITION_UNMET | CURLINFO_CERTINFO type curlInfoResult = | CURLINFO_String of string | CURLINFO_Long of int | CURLINFO_Double of float | CURLINFO_StringList of string list | CURLINFO_StringListList of string list list exception NotImplemented of string let () = Callback.register_exception "Curl.NotImplemented" (NotImplemented "") external global_init : initOption -> unit = "caml_curl_global_init" external global_cleanup : unit -> unit = "caml_curl_global_cleanup" external init : unit -> t = "caml_curl_easy_init" external reset : t -> unit = "caml_curl_easy_reset" external setopt : t -> curlOption -> unit = "caml_curl_easy_setopt" external perform : t -> unit = "caml_curl_easy_perform" external cleanup : t -> unit = "caml_curl_easy_cleanup" external getinfo : t -> curlInfo -> curlInfoResult = "caml_curl_easy_getinfo" external escape : string -> string = "caml_curl_escape" external unescape : string -> string = "caml_curl_unescape" external getdate : string -> float -> float = "caml_curl_getdate" external version : unit -> string = "caml_curl_version" type version_info = { version : string; number : int * int * int; host : string; features : string list; ssl_version : string option; libz_version : string option; protocols : string list; ares : string; ares_num : int; libidn : string; iconv_ver_num : int; libssh_version : string; } external version_info : unit -> version_info = "caml_curl_version_info" external strerror : curlCode -> string = "caml_curl_strerror" external curlCode_of_int : int -> curlCode option = "caml_curl_curlCode_of_int" external int_of_curlCode : curlCode -> int = "caml_curl_int_of_curlCode" let errno = int_of_curlCode type pauseOption = PAUSE_SEND | PAUSE_RECV | PAUSE_ALL external pause : t -> pauseOption list -> unit = "caml_curl_pause" let set_writefunction conn closure = setopt conn (CURLOPT_WRITEFUNCTION closure) let set_readfunction conn closure = setopt conn (CURLOPT_READFUNCTION closure) let set_infilesize conn size = setopt conn (CURLOPT_INFILESIZE size) let set_url conn url = setopt conn (CURLOPT_URL url) let set_proxy conn proxy = setopt conn (CURLOPT_PROXY proxy) let set_proxyport conn proxyport = setopt conn (CURLOPT_PROXYPORT proxyport) let set_httpproxytunnel conn flag = setopt conn (CURLOPT_HTTPPROXYTUNNEL flag) let set_verbose conn flag = setopt conn (CURLOPT_VERBOSE flag) let set_header conn flag = setopt conn (CURLOPT_HEADER flag) let set_noprogress conn flag = setopt conn (CURLOPT_NOPROGRESS flag) let set_nosignal conn flag = setopt conn (CURLOPT_NOSIGNAL flag) let set_nobody conn flag = setopt conn (CURLOPT_NOBODY flag) let set_failonerror conn flag = setopt conn (CURLOPT_FAILONERROR flag) let set_upload conn flag = setopt conn (CURLOPT_UPLOAD flag) let set_post conn flag = setopt conn (CURLOPT_POST flag) let set_ftplistonly conn flag = setopt conn (CURLOPT_FTPLISTONLY flag) let set_ftpappend conn flag = setopt conn (CURLOPT_FTPAPPEND flag) let set_netrc conn netrc = setopt conn (CURLOPT_NETRC netrc) let set_encoding conn encoding = setopt conn (CURLOPT_ENCODING encoding) let set_followlocation conn flag = setopt conn (CURLOPT_FOLLOWLOCATION flag) let set_transfertext conn flag = setopt conn (CURLOPT_TRANSFERTEXT flag) let set_put conn flag = setopt conn (CURLOPT_PUT flag) let set_userpwd conn userpwd = setopt conn (CURLOPT_USERPWD userpwd) let set_proxyuserpwd conn proxyuserpwd = setopt conn (CURLOPT_PROXYUSERPWD proxyuserpwd) let set_range conn range = setopt conn (CURLOPT_RANGE range) let set_errorbuffer conn errorbuffer = setopt conn (CURLOPT_ERRORBUFFER errorbuffer) let set_timeout conn timeout = setopt conn (CURLOPT_TIMEOUT timeout) let set_postfields conn postfields = setopt conn (CURLOPT_POSTFIELDS postfields) let set_postfieldsize conn postfieldsize = setopt conn (CURLOPT_POSTFIELDSIZE postfieldsize) let set_referer conn referer = setopt conn (CURLOPT_REFERER referer) let set_useragent conn useragent = setopt conn (CURLOPT_USERAGENT useragent) let set_ftpport conn ftpport = setopt conn (CURLOPT_FTPPORT ftpport) let set_lowspeedlimit conn lowspeedlimit = setopt conn (CURLOPT_LOWSPEEDLIMIT lowspeedlimit) let set_lowspeedtime conn lowspeedtime = setopt conn (CURLOPT_LOWSPEEDTIME lowspeedtime) let set_resumefrom conn resumefrom = setopt conn (CURLOPT_RESUMEFROM resumefrom) let set_cookie conn cookie = setopt conn (CURLOPT_COOKIE cookie) let set_httpheader conn httpheader = setopt conn (CURLOPT_HTTPHEADER httpheader) let set_httppost conn httppost = setopt conn (CURLOPT_HTTPPOST httppost) let set_sslcert conn sslcert = setopt conn (CURLOPT_SSLCERT sslcert) let set_sslcerttype conn sslcerttype = setopt conn (CURLOPT_SSLCERTTYPE sslcerttype) let set_sslcertpasswd conn sslcertpasswd = setopt conn (CURLOPT_SSLCERTPASSWD sslcertpasswd) let set_sslkey conn sslkey = setopt conn (CURLOPT_SSLKEY sslkey) let set_sslkeytype conn sslkeytype = setopt conn (CURLOPT_SSLKEYTYPE sslkeytype) let set_sslkeypasswd conn sslkeypasswd = setopt conn (CURLOPT_SSLKEYPASSWD sslkeypasswd) let set_sslengine conn sslengine = setopt conn (CURLOPT_SSLENGINE sslengine) let set_sslenginedefault conn flag = setopt conn (CURLOPT_SSLENGINEDEFAULT flag) let set_certinfo conn flag = setopt conn (CURLOPT_CERTINFO flag) let set_crlf conn flag = setopt conn (CURLOPT_CRLF flag) let set_quote conn quote = setopt conn (CURLOPT_QUOTE quote) let set_postquote conn postquote = setopt conn (CURLOPT_POSTQUOTE postquote) let set_headerfunction conn closure = setopt conn (CURLOPT_HEADERFUNCTION closure) let set_cookiefile conn cookiefile = setopt conn (CURLOPT_COOKIEFILE cookiefile) let set_sslversion conn sslversion = setopt conn (CURLOPT_SSLVERSION sslversion) let set_timecondition conn timecondition = setopt conn (CURLOPT_TIMECONDITION timecondition) let set_timevalue conn timevalue = setopt conn (CURLOPT_TIMEVALUE timevalue) let set_customrequest conn customrequest = setopt conn (CURLOPT_CUSTOMREQUEST customrequest) let set_interface conn interface = setopt conn (CURLOPT_INTERFACE interface) let set_krb4level conn krb4level = setopt conn (CURLOPT_KRB4LEVEL krb4level) let set_progressfunction conn closure = setopt conn (CURLOPT_PROGRESSFUNCTION closure) let set_sslverifypeer conn flag = setopt conn (CURLOPT_SSLVERIFYPEER flag) let set_cainfo conn cainfo = setopt conn (CURLOPT_CAINFO cainfo) let set_capath conn capath = setopt conn (CURLOPT_CAPATH capath) let set_filetime conn filetime = setopt conn (CURLOPT_FILETIME filetime) let set_maxredirs conn maxredirs = setopt conn (CURLOPT_MAXREDIRS maxredirs) let set_maxconnects conn maxconnects = setopt conn (CURLOPT_MAXCONNECTS maxconnects) let set_closepolicy conn closepolicy = setopt conn (CURLOPT_CLOSEPOLICY closepolicy) let set_freshconnect conn flag = setopt conn (CURLOPT_FRESHCONNECT flag) let set_forbidreuse conn flag = setopt conn (CURLOPT_FORBIDREUSE flag) let set_randomfile conn randomfile = setopt conn (CURLOPT_RANDOMFILE randomfile) let set_egdsocket conn egdsocket = setopt conn (CURLOPT_EGDSOCKET egdsocket) let set_connecttimeout conn connecttimeout = setopt conn (CURLOPT_CONNECTTIMEOUT connecttimeout) let set_httpget conn flag = setopt conn (CURLOPT_HTTPGET flag) let set_sslverifyhost conn sslverifyhost = setopt conn (CURLOPT_SSLVERIFYHOST sslverifyhost) let set_cookiejar conn cookiejar = setopt conn (CURLOPT_COOKIEJAR cookiejar) let set_sslcipherlist conn sslcipherlist = setopt conn (CURLOPT_SSLCIPHERLIST sslcipherlist) let set_httpversion conn httpversion = setopt conn (CURLOPT_HTTPVERSION httpversion) let set_ftpuseepsv conn flag = setopt conn (CURLOPT_FTPUSEEPSV flag) let set_dnscachetimeout conn dnscachetimeout = setopt conn (CURLOPT_DNSCACHETIMEOUT dnscachetimeout) let set_dnsuseglobalcache conn flag = setopt conn (CURLOPT_DNSUSEGLOBALCACHE flag) let set_debugfunction conn closure = setopt conn (CURLOPT_DEBUGFUNCTION closure) let set_private conn privateData = setopt conn (CURLOPT_PRIVATE privateData) let set_http200aliases conn aliases = setopt conn (CURLOPT_HTTP200ALIASES aliases) let set_unrestrictedauth conn flag = setopt conn (CURLOPT_UNRESTRICTEDAUTH flag) let set_ftpuseeprt conn flag = setopt conn (CURLOPT_FTPUSEEPRT flag) let set_httpauth conn auth = setopt conn (CURLOPT_HTTPAUTH auth) let set_ftpcreatemissingdirs conn flag = setopt conn (CURLOPT_FTPCREATEMISSINGDIRS flag) let set_proxyauth conn auth = setopt conn (CURLOPT_PROXYAUTH auth) let set_ftpresponsetimeout conn timeout = setopt conn (CURLOPT_FTPRESPONSETIMEOUT timeout) let set_ipresolve conn ipresolve = setopt conn (CURLOPT_IPRESOLVE ipresolve) let set_maxfilesize conn size = setopt conn (CURLOPT_MAXFILESIZE size) let set_infilesizelarge conn size = setopt conn (CURLOPT_INFILESIZELARGE size) let set_resumefromlarge conn size = setopt conn (CURLOPT_RESUMEFROMLARGE size) let set_maxfilesizelarge conn size = setopt conn (CURLOPT_MAXFILESIZELARGE size) let set_netrcfile conn file = setopt conn (CURLOPT_NETRCFILE file) let set_ftpssl conn ftpssl = setopt conn (CURLOPT_FTPSSL ftpssl) let set_postfieldsizelarge conn size = setopt conn (CURLOPT_POSTFIELDSIZELARGE size) let set_tcpnodelay conn flag = setopt conn (CURLOPT_TCPNODELAY flag) let set_ftpsslauth conn auth = setopt conn (CURLOPT_FTPSSLAUTH auth) let set_ioctlfunction conn closure = setopt conn (CURLOPT_IOCTLFUNCTION closure) let set_ftpaccount conn account = setopt conn (CURLOPT_FTPACCOUNT account) let set_cookielist conn cookielist = setopt conn (CURLOPT_COOKIELIST cookielist) let set_ignorecontentlength conn flag = setopt conn (CURLOPT_IGNORECONTENTLENGTH flag) let set_ftpskippasvip conn flag = setopt conn (CURLOPT_FTPSKIPPASVIP flag) let set_ftpfilemethod conn ftpMethod = setopt conn (CURLOPT_FTPFILEMETHOD ftpMethod) let set_localport conn port = setopt conn (CURLOPT_LOCALPORT port) let set_localportrange conn range = setopt conn (CURLOPT_LOCALPORTRANGE range) let set_connectonly conn flag = setopt conn (CURLOPT_CONNECTONLY flag) let set_maxsendspeedlarge conn speed = setopt conn (CURLOPT_MAXSENDSPEEDLARGE speed) let set_maxrecvspeedlarge conn speed = setopt conn (CURLOPT_MAXRECVSPEEDLARGE speed) let set_ftpalternativetouser conn user = setopt conn (CURLOPT_FTPALTERNATIVETOUSER user) let set_sslsessionidcache conn flag = setopt conn (CURLOPT_SSLSESSIONIDCACHE flag) let set_sshauthtypes conn types = setopt conn (CURLOPT_SSHAUTHTYPES types) let set_sshpublickeyfile conn keyfile = setopt conn (CURLOPT_SSHPUBLICKEYFILE keyfile) let set_sshprivatekeyfile conn keyfile = setopt conn (CURLOPT_SSHPRIVATEKEYFILE keyfile) let set_ftpsslccc conn ccc = setopt conn (CURLOPT_FTPSSLCCC ccc) let set_timeoutms conn ms = setopt conn (CURLOPT_TIMEOUTMS ms) let set_connecttimeoutms conn ms = setopt conn (CURLOPT_CONNECTTIMEOUTMS ms) let set_httptransferdecoding conn flag = setopt conn (CURLOPT_HTTPTRANSFERDECODING flag) let set_httpcontentdecoding conn flag = setopt conn (CURLOPT_HTTPCONTENTDECODING flag) let set_newfileperms conn perms = setopt conn (CURLOPT_NEWFILEPERMS perms) let set_newdirectoryperms conn perms = setopt conn (CURLOPT_NEWDIRECTORYPERMS perms) let set_post301 conn flag = setopt conn (CURLOPT_POST301 flag) let set_sshhostpublickeymd5 conn key = setopt conn (CURLOPT_SSHHOSTPUBLICKEYMD5 key) let set_copypostfields conn post = setopt conn (CURLOPT_COPYPOSTFIELDS post) let set_proxytransfermode conn flag = setopt conn (CURLOPT_PROXYTRANSFERMODE flag) let set_seekfunction conn closure = setopt conn (CURLOPT_SEEKFUNCTION closure) let set_autoreferer conn b = setopt conn (CURLOPT_AUTOREFERER b) let set_opensocketfunction conn closure = setopt conn (CURLOPT_OPENSOCKETFUNCTION closure) let set_proxytype conn ptype = setopt conn (CURLOPT_PROXYTYPE ptype) let set_protocols conn l = setopt conn (CURLOPT_PROTOCOLS l) let set_redirprotocols conn l = setopt conn (CURLOPT_REDIR_PROTOCOLS l) let set_resolve conn l_add l_del = let acc = List.fold_left (fun acc (host,port,address) -> (host ^ ":" ^ string_of_int port ^ ":" ^ address) :: acc) [] l_add in let acc = List.fold_left (fun acc (host,port) -> ("-" ^ host ^ ":" ^ string_of_int port) :: acc) acc l_del in setopt conn (CURLOPT_RESOLVE acc) let set_dns_servers conn l = setopt conn (CURLOPT_DNS_SERVERS (String.concat "," l)) let set_mailfrom conn l = setopt conn (CURLOPT_MAIL_FROM l) let set_mailrcpt conn l = setopt conn (CURLOPT_MAIL_RCPT l) let set_pipewait conn b = setopt conn (CURLOPT_PIPEWAIT b) let set_username conn s = setopt conn (CURLOPT_USERNAME s) let set_password conn s = setopt conn (CURLOPT_PASSWORD s) let set_login_options conn s = setopt conn (CURLOPT_LOGIN_OPTIONS s) let set_connect_to conn l = setopt conn (CURLOPT_CONNECT_TO l) let set_postredir conn l = setopt conn (CURLOPT_POSTREDIR l) let set_mimepost conn part = setopt conn (CURLOPT_MIMEPOST part) let set_sshknownhosts conn s = setopt conn (CURLOPT_SSHKNOWNHOSTS s) let set_sshkeyfunction conn f = setopt conn (CURLOPT_SSHKEYFUNCTION f) let get_effectiveurl conn = match (getinfo conn CURLINFO_EFFECTIVE_URL) with | CURLINFO_String s -> s | _ -> "" let get_redirecturl conn = match (getinfo conn CURLINFO_REDIRECT_URL) with | CURLINFO_String s -> s | _ -> "" let get_responsecode conn = match (getinfo conn CURLINFO_HTTP_CODE) with | CURLINFO_Long l -> l | _ -> 0 let get_httpcode conn = get_responsecode conn let get_totaltime conn = match (getinfo conn CURLINFO_TOTAL_TIME) with | CURLINFO_Double d -> d | _ -> 0.0 let get_namelookuptime conn = match (getinfo conn CURLINFO_NAMELOOKUP_TIME) with | CURLINFO_Double d -> d | _ -> 0.0 let get_connecttime conn = match (getinfo conn CURLINFO_CONNECT_TIME) with | CURLINFO_Double d -> d | _ -> 0.0 let get_pretransfertime conn = match (getinfo conn CURLINFO_PRETRANSFER_TIME) with | CURLINFO_Double d -> d | _ -> 0.0 let get_sizeupload conn = match (getinfo conn CURLINFO_SIZE_UPLOAD) with | CURLINFO_Double d -> d | _ -> 0.0 let get_sizedownload conn = match (getinfo conn CURLINFO_SIZE_DOWNLOAD) with | CURLINFO_Double d -> d | _ -> 0.0 let get_speeddownload conn = match (getinfo conn CURLINFO_SPEED_DOWNLOAD) with | CURLINFO_Double d -> d | _ -> 0.0 let get_speedupload conn = match (getinfo conn CURLINFO_SPEED_UPLOAD) with | CURLINFO_Double d -> d | _ -> 0.0 let get_headersize conn = match (getinfo conn CURLINFO_HEADER_SIZE) with | CURLINFO_Long l -> l | _ -> 0 let get_requestsize conn = match (getinfo conn CURLINFO_REQUEST_SIZE) with | CURLINFO_Long l -> l | _ -> 0 let get_sslverifyresult conn = match (getinfo conn CURLINFO_SSL_VERIFYRESULT) with | CURLINFO_Long l -> l | _ -> 0 let get_filetime conn = match (getinfo conn CURLINFO_FILETIME) with | CURLINFO_Double d -> d | _ -> 0.0 let get_contentlengthdownload conn = match (getinfo conn CURLINFO_CONTENT_LENGTH_DOWNLOAD) with | CURLINFO_Double d -> d | _ -> 0.0 let get_contentlengthupload conn = match (getinfo conn CURLINFO_CONTENT_LENGTH_UPLOAD) with | CURLINFO_Double d -> d | _ -> 0.0 let get_starttransfertime conn = match (getinfo conn CURLINFO_STARTTRANSFER_TIME) with | CURLINFO_Double d -> d | _ -> 0.0 let get_contenttype conn = match (getinfo conn CURLINFO_CONTENT_TYPE) with | CURLINFO_String s -> s | _ -> "" let get_redirecttime conn = match (getinfo conn CURLINFO_REDIRECT_TIME) with | CURLINFO_Double d -> d | _ -> 0.0 let get_redirectcount conn = match (getinfo conn CURLINFO_REDIRECT_COUNT) with | CURLINFO_Long l -> l | _ -> 0 let get_private conn = match (getinfo conn CURLINFO_PRIVATE) with | CURLINFO_String s -> s | _ -> "" let get_httpconnectcode conn = match (getinfo conn CURLINFO_HTTP_CONNECTCODE) with | CURLINFO_Long l -> l | _ -> 0 let get_certinfo conn = match (getinfo conn CURLINFO_CERTINFO) with | CURLINFO_StringListList l -> l | _ -> [] let generate_auth auth = let result = ref [] in if auth land 1 != 0 then result := [CURLAUTH_BASIC]; if auth land 2 != 0 then result := CURLAUTH_DIGEST :: !result; if auth land 4 != 0 then result := CURLAUTH_GSSNEGOTIATE :: !result; if auth land 8 != 0 then result := CURLAUTH_NTLM :: !result; !result let get_httpauthavail conn = match (getinfo conn CURLINFO_HTTPAUTH_AVAIL) with | CURLINFO_Long l -> generate_auth l | _ -> [] let get_proxyauthavail conn = match (getinfo conn CURLINFO_PROXYAUTH_AVAIL) with | CURLINFO_Long l -> generate_auth l | _ -> [] let get_oserrno conn = match (getinfo conn CURLINFO_OS_ERRNO) with | CURLINFO_Long l -> l | _ -> 0 let get_numconnects conn = match (getinfo conn CURLINFO_NUM_CONNECTS) with | CURLINFO_Long l -> l | _ -> 0 let get_sslengines conn = match (getinfo conn CURLINFO_SSL_ENGINES) with | CURLINFO_StringList l -> l | _ -> [] let get_cookielist conn = match (getinfo conn CURLINFO_COOKIELIST) with | CURLINFO_StringList l -> l | _ -> [] let get_lastsocket conn = match (getinfo conn CURLINFO_LASTSOCKET) with | CURLINFO_Long l -> l | _ -> 0 let get_ftpentrypath conn = match (getinfo conn CURLINFO_FTP_ENTRY_PATH) with | CURLINFO_String s -> s | _ -> "" let get_primaryip conn = match (getinfo conn CURLINFO_PRIMARY_IP) with | CURLINFO_String s -> s | _ -> "" let get_localip conn = match (getinfo conn CURLINFO_LOCAL_IP) with | CURLINFO_String s -> s | _ -> "" let get_localport conn = match (getinfo conn CURLINFO_LOCAL_PORT) with | CURLINFO_Long n -> n | _ -> 0 let get_conditionunmet conn = match (getinfo conn CURLINFO_CONDITION_UNMET) with | CURLINFO_Long n -> n <> 0 | _ -> assert false let () = Callback.register_exception "CurlException" (CurlException (CURLE_OK, 0, "")) class handle = object val conn = init () method handle = conn method perform = perform conn method cleanup = cleanup conn method set_writefunction closure = set_writefunction conn closure method set_readfunction closure = set_readfunction conn closure method set_infilesize size = set_infilesize conn size method set_url url = set_url conn url method set_proxy proxy = set_proxy conn proxy method set_proxyport proxyport = set_proxyport conn proxyport method set_httpproxytunnel flag = set_httpproxytunnel conn flag method set_verbose flag = set_verbose conn flag method set_header flag = set_header conn flag method set_noprogress flag = set_noprogress conn flag method set_nosignal flag = set_nosignal conn flag method set_nobody flag = set_nobody conn flag method set_failonerror flag = set_failonerror conn flag method set_upload flag = set_upload conn flag method set_post flag = set_post conn flag method set_ftplistonly flag = set_ftplistonly conn flag method set_ftpappend flag = set_ftpappend conn flag method set_netrc netrc = set_netrc conn netrc method set_encoding encoding = set_encoding conn encoding method set_followlocation flag = set_followlocation conn flag method set_transfertext flag = set_transfertext conn flag method set_put flag = set_put conn flag method set_userpwd userpwd = set_userpwd conn userpwd method set_proxyuserpwd proxyuserpwd = set_proxyuserpwd conn proxyuserpwd method set_range range = set_range conn range method set_errorbuffer errorbuffer = set_errorbuffer conn errorbuffer method set_timeout timeout = set_timeout conn timeout method set_postfields postfields = set_postfields conn postfields method set_referer referer = set_referer conn referer method set_useragent useragent = set_useragent conn useragent method set_ftpport ftpport = set_ftpport conn ftpport method set_lowspeedlimit lowspeedlimit = set_lowspeedlimit conn lowspeedlimit method set_lowspeedtime lowspeedtime = set_lowspeedtime conn lowspeedtime method set_resumefrom resumefrom = set_resumefrom conn resumefrom method set_cookie cookie = set_cookie conn cookie method set_httpheader httpheader = set_httpheader conn httpheader method set_httppost httppost = set_httppost conn httppost method set_sslcert sslcert = set_sslcert conn sslcert method set_sslcerttype sslcerttype = set_sslcerttype conn sslcerttype method set_sslcertpasswd sslcertpasswd = set_sslcertpasswd conn sslcertpasswd method set_sslkey sslkey = set_sslkey conn sslkey method set_sslkeytype sslkeytype = set_sslkeytype conn sslkeytype method set_sslkeypasswd sslkeypasswd = set_sslkeypasswd conn sslkeypasswd method set_sslengine sslengine = set_sslengine conn sslengine method set_sslenginedefault flag = set_sslenginedefault conn flag method set_certinfo flag = set_certinfo conn flag method set_crlf flag = set_crlf conn flag method set_quote quote = set_quote conn quote method set_postquote postquote = set_postquote conn postquote method set_headerfunction closure = set_headerfunction conn closure method set_cookiefile cookiefile = set_cookiefile conn cookiefile method set_sslversion sslversion = set_sslversion conn sslversion method set_timecondition timecondition = set_timecondition conn timecondition method set_timevalue timevalue = set_timevalue conn timevalue method set_customrequest customrequest = set_customrequest conn customrequest method set_interface interface = set_interface conn interface method set_krb4level krb4level = set_krb4level conn krb4level method set_progressfunction closure = set_progressfunction conn closure method set_sslverifypeer flag = set_sslverifypeer conn flag method set_cainfo cainfo = set_cainfo conn cainfo method set_capath capath = set_capath conn capath method set_filetime filetime = set_filetime conn filetime method set_maxredirs maxredirs = set_maxredirs conn maxredirs method set_maxconnects maxconnects = set_maxconnects conn maxconnects method set_closepolicy closepolicy = set_closepolicy conn closepolicy method set_freshconnect flag = set_freshconnect conn flag method set_forbidreuse flag = set_forbidreuse conn flag method set_randomfile randomfile = set_randomfile conn randomfile method set_egdsocket egdsocket = set_egdsocket conn egdsocket method set_connecttimeout connecttimeout = set_connecttimeout conn connecttimeout method set_httpget flag = set_httpget conn flag method set_sslverifyhost sslverifyhost = set_sslverifyhost conn sslverifyhost method set_cookiejar cookiejar = set_cookiejar conn cookiejar method set_sslcipherlist sslcipherlist = set_sslcipherlist conn sslcipherlist method set_httpversion httpversion = set_httpversion conn httpversion method set_ftpuseepsv flag = set_ftpuseepsv conn flag method set_dnscachetimeout dnscachetimeout = set_dnscachetimeout conn dnscachetimeout method set_dnsuseglobalcache flag = set_dnsuseglobalcache conn flag method set_debugfunction closure = set_debugfunction conn closure method set_private privateData = set_private conn privateData method set_http200aliases aliases = set_http200aliases conn aliases method set_unrestrictedauth flag = set_unrestrictedauth conn flag method set_ftpuseeprt flag = set_ftpuseeprt conn flag method set_httpauth auth = set_httpauth conn auth method set_ftpcreatemissingdirs flag = set_ftpcreatemissingdirs conn flag method set_proxyauth auth = set_proxyauth conn auth method set_ftpresponsetimeout timeout = set_ftpresponsetimeout conn timeout method set_ipresolve ipresolve = set_ipresolve conn ipresolve method set_maxfilesize size = set_maxfilesize conn size method set_infilesizelarge size = set_infilesizelarge conn size method set_resumefromlarge size = set_resumefromlarge conn size method set_maxfilesizelarge size = set_maxfilesizelarge conn size method set_netrcfile file = set_netrcfile conn file method set_ftpssl ftpssl = set_ftpssl conn ftpssl method set_postfieldsize size = set_postfieldsize conn size method set_postfieldsizelarge size = set_postfieldsizelarge conn size method set_tcpnodelay flag = set_tcpnodelay conn flag method set_ftpsslauth flag = set_ftpsslauth conn flag method set_ioctlfunction closure = set_ioctlfunction conn closure method set_ftpaccount account = set_ftpaccount conn account method set_cookielist cookielist = set_cookielist conn cookielist method set_ignorecontentlength flag = set_ignorecontentlength conn flag method set_ftpskippasvip flag = set_ftpskippasvip conn flag method set_ftpfilemethod ftpMethod = set_ftpfilemethod conn ftpMethod method set_localport port = set_localport conn port method set_localportrange range = set_localportrange conn range method set_connectonly flag = set_connectonly conn flag method set_maxsendspeedlarge speed = set_maxsendspeedlarge conn speed method set_maxrecvspeedlarge speed = set_maxrecvspeedlarge conn speed method set_ftpalternativetouser user = set_ftpalternativetouser conn user method set_sslsessionidcache flag = set_sslsessionidcache conn flag method set_sshauthtypes types = set_sshauthtypes conn types method set_sshpublickeyfile keyfile = set_sshpublickeyfile conn keyfile method set_sshprivatekeyfile keyfile = set_sshprivatekeyfile conn keyfile method set_ftpsslccc ccc = set_ftpsslccc conn ccc method set_timeoutms ms = set_timeoutms conn ms method set_connecttimeoutms ms = set_connecttimeoutms conn ms method set_httptransferdecoding flag = set_httptransferdecoding conn flag method set_httpcontentdecoding flag = set_httpcontentdecoding conn flag method set_newfileperms perms = set_newfileperms conn perms method set_newdirectoryperms perms = set_newdirectoryperms conn perms method set_post301 flag = set_post301 conn flag method set_sshhostpublickeymd5 key = set_sshhostpublickeymd5 conn key method set_copypostfields post = set_copypostfields conn post method set_proxytransfermode flag = set_proxytransfermode conn flag method set_seekfunction closure = set_seekfunction conn closure method set_resolve l = set_resolve conn l method set_dns_servers l = set_dns_servers conn l method set_autoreferer b = set_autoreferer conn b method set_opensocketfunction closure = set_opensocketfunction conn closure method set_proxytype t = set_proxytype conn t method set_mimepost p = set_mimepost conn p method set_sshknownhosts s = set_sshknownhosts conn s method set_sshkeyfunction f = set_sshkeyfunction conn f method get_effectiveurl = get_effectiveurl conn method get_redirecturl = get_redirecturl conn method get_responsecode = get_responsecode conn method get_httpcode = get_responsecode conn method get_totaltime = get_totaltime conn method get_namelookuptime = get_namelookuptime conn method get_connecttime = get_connecttime conn method get_pretransfertime = get_pretransfertime conn method get_sizeupload = get_sizeupload conn method get_sizedownload = get_sizedownload conn method get_speeddownload = get_speeddownload conn method get_speedupload = get_speedupload conn method get_headersize = get_headersize conn method get_requestsize = get_requestsize conn method get_sslverifyresult = get_sslverifyresult conn method get_filetime = get_filetime conn method get_contentlengthdownload = get_contentlengthdownload conn method get_contentlengthupload = get_contentlengthupload conn method get_starttransfertime = get_starttransfertime conn method get_contenttype = get_contenttype conn method get_redirecttime = get_redirecttime conn method get_redirectcount = get_redirectcount conn method get_private = get_private conn method get_httpconnectcode = get_httpconnectcode conn method get_httpauthavail = get_httpauthavail conn method get_proxyauthavail = get_proxyauthavail conn method get_oserrno = get_oserrno conn method get_numconnects = get_numconnects conn method get_sslengines = get_sslengines conn method get_cookielist = get_cookielist conn method get_lastsocket = get_lastsocket conn method get_ftpentrypath = get_ftpentrypath conn method get_primaryip = get_primaryip conn method get_localip = get_localip conn method get_localport = get_localport conn method get_conditionunmet = get_conditionunmet conn method get_certinfo = get_certinfo conn end module Multi = struct type mt type curlPipelining = PIPE_NOTHING | PIPE_HTTP1 | PIPE_MULTIPLEX type curlMultiOption = | CURLMOPT_PIPELINING of curlPipelining list | CURLMOPT_MAXCONNECTS of int | CURLMOPT_MAX_PIPELINE_LENGTH of int | CURLMOPT_MAX_HOST_CONNECTIONS of int exception Error of string let () = Callback.register_exception "Curl.Multi.Error" (Error "") external create : unit -> mt = "caml_curl_multi_init" external add : mt -> t -> unit = "caml_curl_multi_add_handle" external perform : mt -> int = "caml_curl_multi_perform_all" external wait : int -> mt -> bool = "caml_curl_multi_wait" let wait ?(timeout_ms=1000) mt = wait timeout_ms mt external remove : mt -> t -> unit = "caml_curl_multi_remove_handle" external remove_finished : mt -> (t * curlCode) option = "caml_curlm_remove_finished" external cleanup : mt -> unit = "caml_curl_multi_cleanup" (* see curlm_sock_cb *) type poll = POLL_NONE | POLL_IN | POLL_OUT | POLL_INOUT | POLL_REMOVE (* see caml_curl_multi_socket_action *) type fd_status = EV_AUTO | EV_IN | EV_OUT | EV_INOUT external set_socket_function : mt -> (Unix.file_descr -> poll -> unit) -> unit = "caml_curl_multi_socketfunction" external set_timer_function : mt -> (int -> unit) -> unit = "caml_curl_multi_timerfunction" external action_all : mt -> int = "caml_curl_multi_socket_all" external socket_action : mt -> Unix.file_descr option -> fd_status -> int = "caml_curl_multi_socket_action" let action_timeout mt = ignore (socket_action mt None EV_AUTO) let action mt fd status = socket_action mt (Some fd) status external timeout : mt -> int = "caml_curl_multi_timeout" external setopt : mt -> curlMultiOption -> unit = "caml_curl_multi_setopt" end ocurl-0.9.0/curl.mli000066400000000000000000001062301356304035200143170ustar00rootroot00000000000000(* * curl.mli * * Copyright (c) 2003-2008, Lars Nilsson, * Copyright (c) 2009, ygrek, *) (** libcurl wrapper *) (** {2 Types} *) type t type curlCode = | CURLE_OK | CURLE_UNSUPPORTED_PROTOCOL | CURLE_FAILED_INIT | CURLE_URL_MALFORMAT | CURLE_URL_MALFORMAT_USER | CURLE_COULDNT_RESOLVE_PROXY | CURLE_COULDNT_RESOLVE_HOST | CURLE_COULDNT_CONNECT | CURLE_FTP_WEIRD_SERVER_REPLY | CURLE_FTP_ACCESS_DENIED | CURLE_FTP_USER_PASSWORD_INCORRECT | CURLE_FTP_WEIRD_PASS_REPLY | CURLE_FTP_WEIRD_USER_REPLY | CURLE_FTP_WEIRD_PASV_REPLY | CURLE_FTP_WEIRD_227_FORMAT | CURLE_FTP_CANT_GET_HOST | CURLE_FTP_CANT_RECONNECT | CURLE_FTP_COULDNT_SET_BINARY | CURLE_PARTIAL_FILE | CURLE_FTP_COULDNT_RETR_FILE | CURLE_FTP_WRITE_ERROR | CURLE_FTP_QUOTE_ERROR | CURLE_HTTP_NOT_FOUND | CURLE_WRITE_ERROR | CURLE_MALFORMAT_USER | CURLE_FTP_COULDNT_STOR_FILE | CURLE_READ_ERROR | CURLE_OUT_OF_MEMORY | CURLE_OPERATION_TIMEOUTED | CURLE_FTP_COULDNT_SET_ASCII | CURLE_FTP_PORT_FAILED | CURLE_FTP_COULDNT_USE_REST | CURLE_FTP_COULDNT_GET_SIZE | CURLE_HTTP_RANGE_ERROR | CURLE_HTTP_POST_ERROR | CURLE_SSL_CONNECT_ERROR | CURLE_FTP_BAD_DOWNLOAD_RESUME | CURLE_FILE_COULDNT_READ_FILE | CURLE_LDAP_CANNOT_BIND | CURLE_LDAP_SEARCH_FAILED | CURLE_LIBRARY_NOT_FOUND | CURLE_FUNCTION_NOT_FOUND | CURLE_ABORTED_BY_CALLBACK | CURLE_BAD_FUNCTION_ARGUMENT | CURLE_BAD_CALLING_ORDER | CURLE_HTTP_PORT_FAILED | CURLE_BAD_PASSWORD_ENTERED | CURLE_TOO_MANY_REDIRECTS | CURLE_UNKNOWN_TELNET_OPTION | CURLE_TELNET_OPTION_SYNTAX | CURLE_OBSOLETE | CURLE_SSL_PEER_CERTIFICATE | CURLE_GOT_NOTHING | CURLE_SSL_ENGINE_NOTFOUND | CURLE_SSL_ENGINE_SETFAILED | CURLE_SEND_ERROR | CURLE_RECV_ERROR | CURLE_SHARE_IN_USE | CURLE_SSL_CERTPROBLEM | CURLE_SSL_CIPHER | CURLE_SSL_CACERT | CURLE_BAD_CONTENT_ENCODING | CURLE_LDAP_INVALID_URL | CURLE_FILESIZE_EXCEEDED | CURLE_USE_SSL_FAILED | CURLE_SEND_FAIL_REWIND | CURLE_SSL_ENGINE_INITFAILED | CURLE_LOGIN_DENIED | CURLE_TFTP_NOTFOUND | CURLE_TFTP_PERM | CURLE_REMOTE_DISK_FULL | CURLE_TFTP_ILLEGAL | CURLE_TFTP_UNKNOWNID | CURLE_REMOTE_FILE_EXISTS | CURLE_TFTP_NOSUCHUSER | CURLE_CONV_FAILED | CURLE_CONV_REQD | CURLE_SSL_CACERT_BADFILE | CURLE_REMOTE_FILE_NOT_FOUND | CURLE_SSH | CURLE_SSL_SHUTDOWN_FAILED | CURLE_AGAIN exception CurlException of (curlCode * int * string) (** exception raised when trying to use options missing from libcurl headers, argument is the option name *) exception NotImplemented of string type curlNETRCOption = | CURL_NETRC_OPTIONAL | CURL_NETRC_IGNORED | CURL_NETRC_REQUIRED type curlEncoding = | CURL_ENCODING_NONE (* identity *) | CURL_ENCODING_DEFLATE (* deflate *) | CURL_ENCODING_GZIP (* gzip *) | CURL_ENCODING_ANY (* all supported encodings *) type curlContentType = | DEFAULT | CONTENTTYPE of string type curlHTTPPost = | CURLFORM_CONTENT of string * string * curlContentType | CURLFORM_FILECONTENT of string * string * curlContentType | CURLFORM_FILE of string * string * curlContentType | CURLFORM_BUFFER of string * string * string * curlContentType (* type curlHTTPPost = | CURLFORM_COPYNAME of string | CURLFORM_PTRNAME of string | CURLFORM_NAMELENGTH of int | CURLFORM_COPYCONTENTS of string | CURLFORM_PTRCONTENTS of string | CURLFORM_FILE of string | CURLFORM_FILECONTENT of string | CURLFORM_CONTENTSLENGTH of int | CURLFORM_CONTENTTYPE of string *) type curlSSLVersion = | SSLVERSION_DEFAULT (** attempt to figure out the remote SSL protocol version *) | SSLVERSION_TLSv1 (** TLSv1.x *) | SSLVERSION_SSLv2 (** SSLv2 *) | SSLVERSION_SSLv3 (** SSLv3 *) | SSLVERSION_TLSv1_0 (** Added in libcurl 7.34.0, will request TLSv1.x in previous versions *) | SSLVERSION_TLSv1_1 (** Added in libcurl 7.34.0, will request TLSv1.x in previous versions *) | SSLVERSION_TLSv1_2 (** Added in libcurl 7.34.0, will request TLSv1.x in previous versions *) | SSLVERSION_TLSv1_3 (** Added in libcurl 7.52.0, will request TLSv1.x in previous versions *) type curlTimeCondition = | TIMECOND_NONE (** since 0.6.1 *) | TIMECOND_IFMODSINCE | TIMECOND_IFUNMODSINCE | TIMECOND_LASTMOD (** since 0.6.1 *) type curlKRB4Level = | KRB4_NONE | KRB4_CLEAR | KRB4_SAFE | KRB4_CONFIDENTIAL | KRB4_PRIVATE type curlClosePolicy = | CLOSEPOLICY_OLDEST | CLOSEPOLICY_LEAST_RECENTLY_USED type curlSSLVerifyHost = | SSLVERIFYHOST_NONE (** connection succeeds regardless of the names in the certificate *) | SSLVERIFYHOST_EXISTENCE (** deprecated, equivalent to SSLVERIFYHOST_HOSTNAME *) | SSLVERIFYHOST_HOSTNAME (** certificate must indicate the matching hostname, or the connection fails *) type curlHTTPVersion = | HTTP_VERSION_NONE (** libcurl will make the best choice *) | HTTP_VERSION_1_0 (** please use HTTP 1.0 *) | HTTP_VERSION_1_1 (** please use HTTP 1.1 *) | HTTP_VERSION_2 (** please use HTTP 2 (requires libcurl >= 7.33.0, otherwise will fallback to libcurl choice) *) | HTTP_VERSION_2TLS (** use version 2 for HTTPS, version 1.1 for HTTP (requires libcurl >= 7.47.0) *) | HTTP_VERSION_2_PRIOR_KNOWLEDGE (** Issue non-TLS HTTP requests using HTTP/2 without HTTP/1 (requires libcurl >= 7.49.0) *) type curlDebugType = | DEBUGTYPE_TEXT | DEBUGTYPE_HEADER_IN | DEBUGTYPE_HEADER_OUT | DEBUGTYPE_DATA_IN | DEBUGTYPE_DATA_OUT | DEBUGTYPE_SSL_DATA_IN | DEBUGTYPE_SSL_DATA_OUT | DEBUGTYPE_END type curlAuth = | CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM | CURLAUTH_ANY | CURLAUTH_ANYSAFE type curlIPResolve = | IPRESOLVE_WHATEVER | IPRESOLVE_V4 | IPRESOLVE_V6 type curlFTPSSL = | FTPSSL_NONE | FTPSSL_TRY | FTPSSL_CONTROL | FTPSSL_ALL type curlFTPSSLAuth = | FTPAUTH_DEFAULT | FTPAUTH_SSL | FTPAUTH_TLS type curlIOCmd = | IOCMD_NOP | IOCMD_RESTARTREAD type curlIOErr = | IOE_OK | IOE_UNKNOWNCMD | IOE_FAILRESTART type curlSeekResult = | SEEKFUNC_OK | SEEKFUNC_FAIL | SEEKFUNC_CANTSEEK type curlFTPMethod = | FTPMETHOD_DEFAULT | FTPMETHOD_MULTICWD | FTPMETHOD_NOCWD | FTPMETHOD_SINGLECWD type curlSSHAuthTypes = | SSHAUTH_ANY | SSHAUTH_PUBLICKEY | SSHAUTH_PASSWORD | SSHAUTH_HOST | SSHAUTH_KEYBOARD type curlFTPSSLCCC = | FTPSSL_CCC_NONE | FTPSSL_CCC_PASSIVE | FTPSSL_CCC_ACTIVE type curlSeek = | SEEK_SET | SEEK_CUR | SEEK_END type curlProxyType = | CURLPROXY_HTTP | CURLPROXY_HTTP_1_0 (** since libcurl 7.19.4 *) | CURLPROXY_SOCKS4 (** since libcurl 7.15.2 *) | CURLPROXY_SOCKS5 | CURLPROXY_SOCKS4A (** since libcurl 7.18.0 *) | CURLPROXY_SOCKS5_HOSTNAME (** since libcurl 7.18.0 *) type curlMIMEPartData = | CURLMIME_DATA of string | CURLMIME_FILEDATA of string type curlMIMEEncoding = | CURLMIME_8BIT | CURLMIME_BINARY | CURLMIME_7BIT | CURLMIME_QUOTEDPRINTABLE | CURLMIME_BASE64 | CURLMIME_NONE type curlMIMEPart = { encoding: curlMIMEEncoding; headers: string list; subparts: curlMIMEPart list; data: curlMIMEPartData; } type curlKHMatch = | CURLKHMATCH_OK | CURLKHMATCH_MISMATCH of string (** Argument consists of the base64-encoded public key of the remote host as as found in the "known hosts" file **) | CURLKHMATCH_MISSING type curlKHStat = | CURLKHSTAT_FINE_ADD_TO_FILE | CURLKHSTAT_FINE | CURLKHSTAT_REJECT | CURLKHSTAT_DEFER (** Protocols to enable (via CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS) *) type curlProto = | CURLPROTO_ALL (** enable everything *) | CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | CURLPROTO_FTPS | CURLPROTO_SCP | CURLPROTO_SFTP | CURLPROTO_TELNET | CURLPROTO_LDAP | CURLPROTO_LDAPS | CURLPROTO_DICT | CURLPROTO_FILE | CURLPROTO_TFTP | CURLPROTO_IMAP | CURLPROTO_IMAPS | CURLPROTO_POP3 | CURLPROTO_POP3S | CURLPROTO_SMTP | CURLPROTO_SMTPS | CURLPROTO_RTSP | CURLPROTO_RTMP | CURLPROTO_RTMPT | CURLPROTO_RTMPE | CURLPROTO_RTMPTE | CURLPROTO_RTMPS | CURLPROTO_RTMPTS | CURLPROTO_GOPHER (** if flag is not supported by libcurl - enabling it does nothing *) type curlPostRedir = | REDIR_POST_ALL | REDIR_POST_301 | REDIR_POST_302 | REDIR_POST_303 (** added in libcurl 7.26.0 *) type curlOption = | CURLOPT_WRITEFUNCTION of (string -> int) | CURLOPT_READFUNCTION of (int -> string) | CURLOPT_INFILESIZE of int | CURLOPT_URL of string | CURLOPT_PROXY of string | CURLOPT_PROXYPORT of int | CURLOPT_HTTPPROXYTUNNEL of bool | CURLOPT_VERBOSE of bool | CURLOPT_HEADER of bool | CURLOPT_NOPROGRESS of bool | CURLOPT_NOSIGNAL of bool | CURLOPT_NOBODY of bool | CURLOPT_FAILONERROR of bool | CURLOPT_UPLOAD of bool | CURLOPT_POST of bool | CURLOPT_FTPLISTONLY of bool | CURLOPT_FTPAPPEND of bool | CURLOPT_NETRC of curlNETRCOption | CURLOPT_ENCODING of curlEncoding | CURLOPT_FOLLOWLOCATION of bool | CURLOPT_TRANSFERTEXT of bool | CURLOPT_PUT of bool | CURLOPT_USERPWD of string | CURLOPT_PROXYUSERPWD of string | CURLOPT_RANGE of string | CURLOPT_ERRORBUFFER of string ref | CURLOPT_TIMEOUT of int | CURLOPT_POSTFIELDS of string | CURLOPT_POSTFIELDSIZE of int | CURLOPT_REFERER of string | CURLOPT_USERAGENT of string | CURLOPT_FTPPORT of string | CURLOPT_LOWSPEEDLIMIT of int | CURLOPT_LOWSPEEDTIME of int | CURLOPT_RESUMEFROM of int | CURLOPT_COOKIE of string | CURLOPT_HTTPHEADER of string list | CURLOPT_HTTPPOST of curlHTTPPost list | CURLOPT_SSLCERT of string | CURLOPT_SSLCERTTYPE of string | CURLOPT_SSLCERTPASSWD of string | CURLOPT_SSLKEY of string | CURLOPT_SSLKEYTYPE of string | CURLOPT_SSLKEYPASSWD of string | CURLOPT_SSLENGINE of string | CURLOPT_SSLENGINEDEFAULT of bool | CURLOPT_CRLF of bool | CURLOPT_QUOTE of string list | CURLOPT_POSTQUOTE of string list | CURLOPT_HEADERFUNCTION of (string -> int) | CURLOPT_COOKIEFILE of string | CURLOPT_SSLVERSION of curlSSLVersion | CURLOPT_TIMECONDITION of curlTimeCondition | CURLOPT_TIMEVALUE of int32 | CURLOPT_CUSTOMREQUEST of string | CURLOPT_INTERFACE of string | CURLOPT_KRB4LEVEL of curlKRB4Level | CURLOPT_PROGRESSFUNCTION of (float -> float -> float -> float -> bool) | CURLOPT_SSLVERIFYPEER of bool | CURLOPT_CAINFO of string | CURLOPT_CAPATH of string | CURLOPT_FILETIME of bool | CURLOPT_MAXREDIRS of int | CURLOPT_MAXCONNECTS of int | CURLOPT_CLOSEPOLICY of curlClosePolicy | CURLOPT_FRESHCONNECT of bool | CURLOPT_FORBIDREUSE of bool | CURLOPT_RANDOMFILE of string | CURLOPT_EGDSOCKET of string | CURLOPT_CONNECTTIMEOUT of int | CURLOPT_HTTPGET of bool | CURLOPT_SSLVERIFYHOST of curlSSLVerifyHost | CURLOPT_COOKIEJAR of string | CURLOPT_SSLCIPHERLIST of string | CURLOPT_HTTPVERSION of curlHTTPVersion | CURLOPT_FTPUSEEPSV of bool | CURLOPT_DNSCACHETIMEOUT of int | CURLOPT_DNSUSEGLOBALCACHE of bool | CURLOPT_DEBUGFUNCTION of (t -> curlDebugType -> string -> unit) | CURLOPT_PRIVATE of string (** doesn't employ libcurl's CURLOPT_PRIVATE *) | CURLOPT_HTTP200ALIASES of string list | CURLOPT_UNRESTRICTEDAUTH of bool | CURLOPT_FTPUSEEPRT of bool | CURLOPT_HTTPAUTH of curlAuth list | CURLOPT_FTPCREATEMISSINGDIRS of bool | CURLOPT_PROXYAUTH of curlAuth list | CURLOPT_FTPRESPONSETIMEOUT of int | CURLOPT_IPRESOLVE of curlIPResolve | CURLOPT_MAXFILESIZE of int32 | CURLOPT_INFILESIZELARGE of int64 | CURLOPT_RESUMEFROMLARGE of int64 | CURLOPT_MAXFILESIZELARGE of int64 | CURLOPT_NETRCFILE of string | CURLOPT_FTPSSL of curlFTPSSL | CURLOPT_POSTFIELDSIZELARGE of int64 | CURLOPT_TCPNODELAY of bool | CURLOPT_FTPSSLAUTH of curlFTPSSLAuth | CURLOPT_IOCTLFUNCTION of (t -> curlIOCmd -> curlIOErr) | CURLOPT_FTPACCOUNT of string | CURLOPT_COOKIELIST of string | CURLOPT_IGNORECONTENTLENGTH of bool | CURLOPT_FTPSKIPPASVIP of bool | CURLOPT_FTPFILEMETHOD of curlFTPMethod | CURLOPT_LOCALPORT of int | CURLOPT_LOCALPORTRANGE of int | CURLOPT_CONNECTONLY of bool | CURLOPT_MAXSENDSPEEDLARGE of int64 | CURLOPT_MAXRECVSPEEDLARGE of int64 | CURLOPT_FTPALTERNATIVETOUSER of string | CURLOPT_SSLSESSIONIDCACHE of bool | CURLOPT_SSHAUTHTYPES of curlSSHAuthTypes list | CURLOPT_SSHPUBLICKEYFILE of string | CURLOPT_SSHPRIVATEKEYFILE of string | CURLOPT_FTPSSLCCC of curlFTPSSLCCC | CURLOPT_TIMEOUTMS of int | CURLOPT_CONNECTTIMEOUTMS of int | CURLOPT_HTTPTRANSFERDECODING of bool | CURLOPT_HTTPCONTENTDECODING of bool | CURLOPT_NEWFILEPERMS of int | CURLOPT_NEWDIRECTORYPERMS of int | CURLOPT_POST301 of bool | CURLOPT_SSHHOSTPUBLICKEYMD5 of string | CURLOPT_COPYPOSTFIELDS of string | CURLOPT_PROXYTRANSFERMODE of bool | CURLOPT_SEEKFUNCTION of (int64 -> curlSeek -> curlSeekResult) | CURLOPT_AUTOREFERER of bool | CURLOPT_OPENSOCKETFUNCTION of (Unix.file_descr -> unit) | CURLOPT_PROXYTYPE of curlProxyType | CURLOPT_PROTOCOLS of curlProto list | CURLOPT_REDIR_PROTOCOLS of curlProto list | CURLOPT_RESOLVE of string list | CURLOPT_DNS_SERVERS of string | CURLOPT_MAIL_FROM of string | CURLOPT_MAIL_RCPT of string list | CURLOPT_PIPEWAIT of bool | CURLOPT_CERTINFO of bool | CURLOPT_USERNAME of string | CURLOPT_PASSWORD of string | CURLOPT_LOGIN_OPTIONS of string | CURLOPT_CONNECT_TO of string list | CURLOPT_POSTREDIR of curlPostRedir list | CURLOPT_MIMEPOST of curlMIMEPart list (* @since libcurl 7.56.0 *) | CURLOPT_SSHKNOWNHOSTS of string | CURLOPT_SSHKEYFUNCTION of (curlKHMatch -> string -> curlKHStat) (** The second argument to the passed function consists of the raw bytes of the public key sent by the remote host. If the function raises an exception the key will be rejected, and the connection will fail.**) type initOption = | CURLINIT_GLOBALALL | CURLINIT_GLOBALSSL | CURLINIT_GLOBALWIN32 | CURLINIT_GLOBALNOTHING type curlInfo = | CURLINFO_EFFECTIVE_URL | CURLINFO_HTTP_CODE | CURLINFO_RESPONSE_CODE | CURLINFO_TOTAL_TIME | CURLINFO_NAMELOOKUP_TIME | CURLINFO_CONNECT_TIME | CURLINFO_PRETRANSFER_TIME | CURLINFO_SIZE_UPLOAD | CURLINFO_SIZE_DOWNLOAD | CURLINFO_SPEED_DOWNLOAD | CURLINFO_SPEED_UPLOAD | CURLINFO_HEADER_SIZE | CURLINFO_REQUEST_SIZE | CURLINFO_SSL_VERIFYRESULT | CURLINFO_FILETIME | CURLINFO_CONTENT_LENGTH_DOWNLOAD | CURLINFO_CONTENT_LENGTH_UPLOAD | CURLINFO_STARTTRANSFER_TIME | CURLINFO_CONTENT_TYPE | CURLINFO_REDIRECT_TIME | CURLINFO_REDIRECT_COUNT | CURLINFO_PRIVATE (** returns value previously set with CURLOPT_PRIVATE, doesn't employ libcurl's CURLINFO_PRIVATE *) | CURLINFO_HTTP_CONNECTCODE | CURLINFO_HTTPAUTH_AVAIL | CURLINFO_PROXYAUTH_AVAIL | CURLINFO_OS_ERRNO | CURLINFO_NUM_CONNECTS | CURLINFO_SSL_ENGINES | CURLINFO_COOKIELIST | CURLINFO_LASTSOCKET | CURLINFO_FTP_ENTRY_PATH | CURLINFO_REDIRECT_URL | CURLINFO_PRIMARY_IP | CURLINFO_LOCAL_IP | CURLINFO_LOCAL_PORT | CURLINFO_CONDITION_UNMET | CURLINFO_CERTINFO type curlInfoResult = | CURLINFO_String of string | CURLINFO_Long of int | CURLINFO_Double of float | CURLINFO_StringList of string list | CURLINFO_StringListList of string list list type version_info = { version : string; number : int * int * int; host : string; features : string list; ssl_version : string option; libz_version : string option; protocols : string list; ares : string; (** starting from this field are optional features - may be empty/zero *) ares_num : int; libidn : string; iconv_ver_num : int; libssh_version : string; } type pauseOption = PAUSE_SEND | PAUSE_RECV | PAUSE_ALL (** {2 curl_easy API} *) val global_init : initOption -> unit val global_cleanup : unit -> unit val init : unit -> t val reset : t -> unit (** Reset [t] to the default state *) val setopt : t -> curlOption -> unit (** @raise NotImplemented for not implemented option *) val perform : t -> unit val cleanup : t -> unit val getinfo : t -> curlInfo -> curlInfoResult val escape : string -> string val unescape : string -> string val getdate : string -> float -> float val version : unit -> string val strerror : curlCode -> string val int_of_curlCode : curlCode -> int val curlCode_of_int : int -> curlCode option (** same as [int_of_curlCode] *) val errno : curlCode -> int val version_info : unit -> version_info val pause : t -> pauseOption list -> unit (** {2 Set transfer options} All callback functions shouldn't raise exceptions. Any exception raised in callback function will be silently caught and discared, and transfer will be aborted. *) val set_writefunction : t -> (string -> int) -> unit val set_readfunction : t -> (int -> string) -> unit (** [readfunction n] should return string of length at most [n], otherwise transfer will be aborted (as if with exception) *) val set_infilesize : t -> int -> unit val set_url : t -> string -> unit val set_proxy : t -> string -> unit val set_proxyport : t -> int -> unit val set_httpproxytunnel : t -> bool -> unit val set_verbose : t -> bool -> unit val set_header : t -> bool -> unit val set_noprogress : t -> bool -> unit val set_nosignal : t -> bool -> unit val set_nobody : t -> bool -> unit val set_failonerror : t -> bool -> unit val set_upload : t -> bool -> unit val set_post : t -> bool -> unit val set_ftplistonly : t -> bool -> unit val set_ftpappend : t -> bool -> unit val set_netrc : t -> curlNETRCOption -> unit val set_encoding : t -> curlEncoding -> unit val set_followlocation : t -> bool -> unit val set_transfertext : t -> bool -> unit val set_put : t -> bool -> unit val set_userpwd : t -> string -> unit val set_proxyuserpwd : t -> string -> unit val set_range : t -> string -> unit val set_errorbuffer : t -> string ref -> unit val set_timeout : t -> int -> unit val set_postfields : t -> string -> unit val set_postfieldsize : t -> int -> unit val set_referer : t -> string -> unit val set_useragent : t -> string -> unit val set_ftpport : t -> string -> unit val set_lowspeedlimit : t -> int -> unit val set_lowspeedtime : t -> int -> unit val set_resumefrom : t -> int -> unit val set_cookie : t -> string -> unit val set_httpheader : t -> string list -> unit val set_httppost : t -> curlHTTPPost list -> unit val set_sslcert : t -> string -> unit val set_sslcerttype : t -> string -> unit val set_sslcertpasswd : t -> string -> unit val set_sslkey : t -> string -> unit val set_sslkeytype : t -> string -> unit val set_sslkeypasswd : t -> string -> unit val set_sslengine : t -> string -> unit val set_sslenginedefault : t -> bool -> unit val set_certinfo : t -> bool -> unit val set_crlf : t -> bool -> unit val set_quote : t -> string list -> unit val set_postquote : t -> string list -> unit val set_headerfunction: t -> (string -> int) -> unit val set_cookiefile : t -> string -> unit val set_sslversion : t -> curlSSLVersion -> unit val set_timecondition : t -> curlTimeCondition -> unit val set_timevalue : t -> int32 -> unit val set_customrequest : t -> string -> unit val set_interface : t -> string -> unit val set_krb4level : t -> curlKRB4Level -> unit val set_progressfunction : t -> (float -> float -> float -> float -> bool) -> unit val set_sslverifypeer : t -> bool -> unit val set_cainfo : t -> string -> unit val set_capath : t -> string -> unit val set_filetime : t -> bool -> unit val set_maxredirs : t -> int -> unit val set_maxconnects : t -> int -> unit val set_closepolicy : t -> curlClosePolicy -> unit val set_freshconnect : t -> bool -> unit val set_forbidreuse : t -> bool -> unit val set_randomfile : t -> string -> unit val set_egdsocket : t -> string -> unit val set_connecttimeout : t -> int -> unit val set_httpget : t -> bool -> unit val set_sslverifyhost : t -> curlSSLVerifyHost -> unit val set_cookiejar : t -> string -> unit val set_sslcipherlist : t -> string -> unit val set_httpversion : t -> curlHTTPVersion -> unit val set_ftpuseepsv : t -> bool -> unit val set_dnscachetimeout : t -> int -> unit val set_dnsuseglobalcache : t -> bool -> unit val set_debugfunction : t -> (t -> curlDebugType -> string -> unit) -> unit val set_private : t -> string -> unit val set_http200aliases : t -> string list -> unit val set_unrestrictedauth : t -> bool -> unit val set_ftpuseeprt : t -> bool -> unit val set_httpauth : t -> curlAuth list -> unit val set_ftpcreatemissingdirs : t -> bool -> unit val set_proxyauth : t -> curlAuth list -> unit val set_ftpresponsetimeout : t -> int -> unit val set_ipresolve : t -> curlIPResolve -> unit val set_maxfilesize : t -> int32 -> unit val set_infilesizelarge : t -> int64 -> unit val set_resumefromlarge : t -> int64 -> unit val set_maxfilesizelarge : t -> int64 -> unit val set_netrcfile : t -> string -> unit val set_ftpssl : t -> curlFTPSSL -> unit val set_postfieldsizelarge : t -> int64 -> unit val set_tcpnodelay : t -> bool -> unit val set_ftpsslauth : t -> curlFTPSSLAuth -> unit val set_ioctlfunction : t -> (t -> curlIOCmd -> curlIOErr) -> unit val set_ftpaccount : t -> string -> unit val set_cookielist : t -> string -> unit val set_ignorecontentlength : t -> bool -> unit val set_ftpskippasvip : t -> bool -> unit val set_ftpfilemethod : t -> curlFTPMethod -> unit val set_localport : t -> int -> unit val set_localportrange : t -> int -> unit val set_connectonly : t -> bool -> unit val set_maxsendspeedlarge : t -> int64 -> unit val set_maxrecvspeedlarge : t -> int64 -> unit val set_ftpalternativetouser : t -> string -> unit val set_sslsessionidcache : t -> bool -> unit val set_sshauthtypes : t -> curlSSHAuthTypes list -> unit val set_sshpublickeyfile : t -> string -> unit val set_sshprivatekeyfile : t -> string -> unit val set_ftpsslccc : t -> curlFTPSSLCCC -> unit val set_timeoutms : t -> int -> unit val set_connecttimeoutms : t -> int -> unit val set_httptransferdecoding : t -> bool -> unit val set_httpcontentdecoding : t -> bool -> unit val set_newfileperms : t -> int -> unit val set_newdirectoryperms : t -> int -> unit val set_post301 : t -> bool -> unit val set_sshhostpublickeymd5 : t -> string -> unit val set_copypostfields : t -> string -> unit val set_proxytransfermode : t -> bool -> unit val set_seekfunction : t -> (int64 -> curlSeek -> curlSeekResult) -> unit val set_autoreferer : t -> bool -> unit val set_opensocketfunction : t -> (Unix.file_descr -> unit) -> unit val set_proxytype : t -> curlProxyType -> unit val set_protocols : t -> curlProto list -> unit val set_redirprotocols : t -> curlProto list -> unit (** [set_resolve t add del] adjusts builtin dns mapping @param add is the (host,port,address) list to add to dns mapping @param del is the (host,port) list to remove from mapping *) val set_resolve : t -> (string * int * string) list -> (string * int) list -> unit val set_dns_servers : t -> string list -> unit val set_mailfrom : t -> string -> unit val set_mailrcpt : t -> string list -> unit val set_pipewait : t -> bool -> unit val set_username : t -> string -> unit (** @since 0.8.0 *) val set_password : t -> string -> unit (** @since 0.8.0 *) val set_login_options : t -> string -> unit (** @since 0.8.0 *) val set_connect_to : t -> string list -> unit (** @since 0.8.0 *) val set_postredir : t -> curlPostRedir list -> unit (** @since 0.8.1 *) val set_mimepost : t -> curlMIMEPart list -> unit (** @since 0.8.2 *) val set_sshknownhosts : t -> string -> unit val set_sshkeyfunction : t -> (curlKHMatch -> string -> curlKHStat) -> unit (** {2 Get transfer properties} *) val get_effectiveurl : t -> string val get_redirecturl : t -> string val get_httpcode : t -> int val get_responsecode : t -> int val get_totaltime : t -> float val get_namelookuptime : t -> float val get_connecttime : t -> float val get_pretransfertime : t -> float val get_sizeupload : t -> float val get_sizedownload : t -> float val get_speeddownload : t -> float val get_speedupload : t -> float val get_headersize : t -> int val get_requestsize : t -> int val get_sslverifyresult : t -> int val get_filetime : t -> float val get_contentlengthdownload : t -> float val get_contentlengthupload : t -> float val get_starttransfertime : t -> float val get_contenttype : t -> string val get_redirecttime : t -> float val get_redirectcount : t -> int val get_private : t -> string val get_httpconnectcode : t -> int val get_httpauthavail : t -> curlAuth list val get_proxyauthavail : t -> curlAuth list val get_oserrno : t -> int val get_numconnects : t -> int val get_sslengines : t -> string list val get_cookielist : t -> string list val get_lastsocket : t -> int val get_ftpentrypath : t -> string val get_primaryip : t -> string val get_localip : t -> string (** @since 0.5.5 (libcurl 7.21.0) *) val get_localport : t -> int (** @since 0.5.5 (libcurl 7.21.0) *) val get_conditionunmet : t -> bool (** @since 0.6.1 (libcurl 7.19.4) *) val get_certinfo : t -> string list list (** {2 Object interface} *) class handle : object ('a) val conn : t method handle : t method cleanup : unit method perform : unit method set_writefunction : (string -> int) -> unit method set_readfunction : (int -> string) -> unit method set_infilesize : int -> unit method set_url : string -> unit method set_proxy : string -> unit method set_proxyport : int -> unit method set_httpproxytunnel : bool -> unit method set_verbose : bool -> unit method set_header : bool -> unit method set_noprogress : bool -> unit method set_nosignal : bool -> unit method set_nobody : bool -> unit method set_failonerror : bool -> unit method set_upload : bool -> unit method set_post : bool -> unit method set_ftplistonly : bool -> unit method set_ftpappend : bool -> unit method set_netrc : curlNETRCOption -> unit method set_encoding : curlEncoding -> unit method set_followlocation : bool -> unit method set_transfertext : bool -> unit method set_put : bool -> unit method set_userpwd : string -> unit method set_proxyuserpwd : string -> unit method set_range : string -> unit method set_errorbuffer : string ref -> unit method set_timeout : int -> unit method set_postfields : string -> unit method set_postfieldsize : int -> unit method set_referer : string -> unit method set_useragent : string -> unit method set_ftpport : string -> unit method set_lowspeedlimit : int -> unit method set_lowspeedtime : int -> unit method set_resumefrom : int -> unit method set_cookie : string -> unit method set_httpheader : string list -> unit method set_httppost : curlHTTPPost list -> unit method set_sslcert : string -> unit method set_sslcerttype : string -> unit method set_sslcertpasswd : string -> unit method set_sslkey : string -> unit method set_sslkeytype : string -> unit method set_sslkeypasswd : string -> unit method set_sslengine : string -> unit method set_sslenginedefault : bool -> unit method set_certinfo : bool -> unit method set_crlf : bool -> unit method set_quote : string list -> unit method set_postquote : string list -> unit method set_headerfunction: (string -> int) -> unit method set_cookiefile : string -> unit method set_sslversion : curlSSLVersion -> unit method set_timecondition : curlTimeCondition -> unit method set_timevalue : int32 -> unit method set_customrequest : string -> unit method set_interface : string -> unit method set_krb4level : curlKRB4Level -> unit method set_progressfunction : (float -> float -> float -> float -> bool) -> unit method set_sslverifypeer : bool -> unit method set_cainfo : string -> unit method set_capath : string -> unit method set_filetime : bool -> unit method set_maxredirs : int -> unit method set_maxconnects : int -> unit method set_closepolicy : curlClosePolicy -> unit method set_freshconnect : bool -> unit method set_forbidreuse : bool -> unit method set_randomfile : string -> unit method set_egdsocket : string -> unit method set_connecttimeout : int -> unit method set_httpget : bool -> unit method set_sslverifyhost : curlSSLVerifyHost -> unit method set_cookiejar : string -> unit method set_sslcipherlist : string -> unit method set_httpversion : curlHTTPVersion -> unit method set_ftpuseepsv : bool -> unit method set_dnscachetimeout : int -> unit method set_dnsuseglobalcache : bool -> unit method set_debugfunction : (t -> curlDebugType -> string -> unit) -> unit method set_private : string -> unit method set_http200aliases : string list -> unit method set_unrestrictedauth : bool -> unit method set_ftpuseeprt : bool -> unit method set_httpauth : curlAuth list -> unit method set_ftpcreatemissingdirs : bool -> unit method set_proxyauth : curlAuth list -> unit method set_ftpresponsetimeout : int -> unit method set_ipresolve : curlIPResolve -> unit method set_maxfilesize : int32 -> unit method set_infilesizelarge : int64 -> unit method set_resumefromlarge : int64 -> unit method set_maxfilesizelarge : int64 -> unit method set_netrcfile : string -> unit method set_ftpssl : curlFTPSSL -> unit method set_postfieldsizelarge : int64 -> unit method set_tcpnodelay : bool -> unit method set_ftpsslauth : curlFTPSSLAuth -> unit method set_ioctlfunction : (t -> curlIOCmd -> curlIOErr) -> unit method set_ftpaccount : string -> unit method set_cookielist : string -> unit method set_ignorecontentlength : bool -> unit method set_ftpskippasvip : bool -> unit method set_ftpfilemethod : curlFTPMethod -> unit method set_localport : int -> unit method set_localportrange : int -> unit method set_connectonly : bool -> unit method set_maxsendspeedlarge : int64 -> unit method set_maxrecvspeedlarge : int64 -> unit method set_ftpalternativetouser : string -> unit method set_sslsessionidcache : bool -> unit method set_sshauthtypes : curlSSHAuthTypes list -> unit method set_sshpublickeyfile : string -> unit method set_sshprivatekeyfile : string -> unit method set_ftpsslccc : curlFTPSSLCCC -> unit method set_timeoutms : int -> unit method set_connecttimeoutms : int -> unit method set_httptransferdecoding : bool -> unit method set_httpcontentdecoding : bool -> unit method set_newfileperms : int -> unit method set_newdirectoryperms : int -> unit method set_post301 : bool -> unit method set_sshhostpublickeymd5 : string -> unit method set_copypostfields : string -> unit method set_proxytransfermode : bool -> unit method set_seekfunction : (int64 -> curlSeek -> curlSeekResult) -> unit method set_autoreferer : bool -> unit method set_opensocketfunction : (Unix.file_descr -> unit) -> unit method set_proxytype : curlProxyType -> unit method set_resolve : (string * int * string) list -> (string * int) list -> unit method set_dns_servers : string list -> unit method set_mimepost : curlMIMEPart list -> unit method set_sshknownhosts : string -> unit method set_sshkeyfunction : (curlKHMatch -> string -> curlKHStat) -> unit method get_effectiveurl : string method get_redirecturl : string method get_httpcode : int method get_responsecode : int method get_totaltime : float method get_namelookuptime : float method get_connecttime : float method get_pretransfertime : float method get_sizeupload : float method get_sizedownload : float method get_speeddownload : float method get_speedupload : float method get_headersize : int method get_requestsize : int method get_sslverifyresult : int method get_filetime : float method get_contentlengthdownload : float method get_contentlengthupload : float method get_starttransfertime : float method get_contenttype : string method get_redirecttime : float method get_redirectcount : int method get_private : string method get_httpconnectcode : int method get_httpauthavail : curlAuth list method get_proxyauthavail : curlAuth list method get_oserrno : int method get_numconnects : int method get_sslengines : string list method get_cookielist : string list method get_lastsocket : int method get_ftpentrypath : string method get_primaryip : string method get_localip : string method get_localport : int method get_conditionunmet : bool method get_certinfo : string list list end (** {2 curl_multi API} *) (** Curl multi stack. Functions may raise [Failure] on critical errors *) module Multi : sig (** type of Curl multi stack *) type mt type curlPipelining = PIPE_NOTHING | PIPE_HTTP1 | PIPE_MULTIPLEX type curlMultiOption = | CURLMOPT_PIPELINING of curlPipelining list | CURLMOPT_MAXCONNECTS of int | CURLMOPT_MAX_PIPELINE_LENGTH of int | CURLMOPT_MAX_HOST_CONNECTIONS of int (** exception raised on internal errors *) exception Error of string (** create new multi stack *) val create : unit -> mt (** add handle to multi stack *) val add : mt -> t -> unit (** remove handle from multi stack (effectively halting the transfer) *) val remove : mt -> t -> unit (** perform pending data transfers (if any) on all handles currently in multi stack @return the number of handles that still transfer data *) val perform : mt -> int (** wait till there are some active data transfers on multi stack @return whether [perform] should be called *) val wait : ?timeout_ms:int -> mt -> bool (** remove finished handle from the multi stack if any. The returned handle may be reused *) val remove_finished : mt -> (t * curlCode) option (** destroy multi handle (all transfers are stopped, but individual {!type: Curl.t} handles can be reused) *) val cleanup : mt -> unit (** events that should be reported for the socket *) type poll = | POLL_NONE (** none *) | POLL_IN (** available for reading *) | POLL_OUT (** available for writing *) | POLL_INOUT (** both *) | POLL_REMOVE (** socket not needed anymore *) (** socket status *) type fd_status = | EV_AUTO (** determine socket status automatically (with extra system call) *) | EV_IN (** socket has incoming data *) | EV_OUT (** socket is available for writing *) | EV_INOUT (** both *) (** set the function to receive notifications on what socket events are currently interesting for libcurl on the specified socket handle *) val set_socket_function : mt -> (Unix.file_descr -> poll -> unit) -> unit (** set the function to receive notification when libcurl internal timeout changes, timeout value is in milliseconds NB {!action_timeout} should be called when timeout occurs *) val set_timer_function : mt -> (int -> unit) -> unit (** perform pending data transfers (if any) on all handles currently in multi stack (not recommended, {!action} should be used instead) @return the number of handles that still transfer data @raise Error on errors *) val action_all : mt -> int (** inform libcurl that timeout occured @raise Error on errors *) val action_timeout : mt -> unit (** [action mt fd status] informs libcurl about event on the specified socket. [status] specifies socket status. Perform pending data transfers. @return the number of handles still active @raise Error on errors *) val action : mt -> Unix.file_descr -> fd_status -> int (** [timeout mt] polls multi handle for timeout (not recommended, use {!set_timer_function} instead). @return maximum allowed number of milliseconds to wait before calling libcurl to perform actions @raise Error on errors *) external timeout : mt -> int = "caml_curl_multi_timeout" (** @raise NotImplemented for not implemented option *) val setopt : mt -> curlMultiOption -> unit end ocurl-0.9.0/curl_lwt.ml000066400000000000000000000047071356304035200150420ustar00rootroot00000000000000(** Lwt support for Curl *) module M = Curl.Multi let log fmt = Printf.ksprintf prerr_endline fmt type multi = { mt : Curl.Multi.mt; all_events : (Unix.file_descr, Lwt_engine.event list) Hashtbl.t; wakeners : (Curl.t, Curl.curlCode Lwt.u) Hashtbl.t; } let create () = let mt = M.create () in let timer_event = ref Lwt_engine.fake_event in let all_events = Hashtbl.create 32 in let wakeners = Hashtbl.create 32 in let finished s = let rec loop n = match M.remove_finished mt with | None -> () | Some (h,code) -> begin try let w = Hashtbl.find wakeners h in Hashtbl.remove wakeners h; Lwt.wakeup w code with Not_found -> prerr_endline "curl_lwt: orphan handle, how come?" end; loop (n+1) in loop 0 in let on_readable fd _ = let (_:int) = M.action mt fd M.EV_IN in finished "on_readable"; in let on_writable fd _ = let (_:int) = M.action mt fd M.EV_OUT in finished "on_writable"; in let on_timer _ = Lwt_engine.stop_event !timer_event; M.action_timeout mt; finished "on_timer" in M.set_timer_function mt begin fun timeout -> Lwt_engine.stop_event !timer_event; (* duplicate stop_event is ok *) timer_event := Lwt_engine.on_timer (float_of_int timeout /. 1000.) false on_timer end; M.set_socket_function mt begin fun fd what -> begin try List.iter Lwt_engine.stop_event (Hashtbl.find all_events fd); Hashtbl.remove all_events fd; with Not_found -> () (* first event for the socket - no association *) end; let events = match what with | M.POLL_REMOVE | M.POLL_NONE -> [] | M.POLL_IN -> [Lwt_engine.on_readable fd (on_readable fd)] | M.POLL_OUT -> [Lwt_engine.on_writable fd (on_writable fd)] | M.POLL_INOUT -> [Lwt_engine.on_readable fd (on_readable fd); Lwt_engine.on_writable fd (on_writable fd)] in match events with | [] -> () | _ -> Hashtbl.add all_events fd events; end; { mt; all_events; wakeners; } (* lwt may not run in parallel so one global is OK'ish *) let global = lazy (create ()) let setopt opt = let t = Lazy.force global in M.setopt t.mt opt let perform h = let t = Lazy.force global in let (waiter,wakener) = Lwt.wait () in let waiter = Lwt.protected waiter in Lwt.on_cancel waiter (fun () -> Curl.Multi.remove t.mt h; Hashtbl.remove t.wakeners h; ); Hashtbl.add t.wakeners h wakener; M.add t.mt h; waiter ocurl-0.9.0/curl_lwt.mli000066400000000000000000000003631356304035200152050ustar00rootroot00000000000000(** Asynchronous API with Lwt *) (** perform [Curl.t] asynchronously @return transfer result code *) val perform : Curl.t -> Curl.curlCode Lwt.t (** set option on global multi_handle *) val setopt : Curl.Multi.curlMultiOption -> unit ocurl-0.9.0/errors.ml000066400000000000000000000060001356304035200145070ustar00rootroot00000000000000let all = [ "CURLE_OK"; "CURLE_UNSUPPORTED_PROTOCOL"; "CURLE_FAILED_INIT"; "CURLE_URL_MALFORMAT"; "CURLE_URL_MALFORMAT_USER"; "CURLE_COULDNT_RESOLVE_PROXY"; "CURLE_COULDNT_RESOLVE_HOST"; "CURLE_COULDNT_CONNECT"; "CURLE_FTP_WEIRD_SERVER_REPLY"; "CURLE_FTP_ACCESS_DENIED"; "CURLE_FTP_USER_PASSWORD_INCORRECT"; "CURLE_FTP_WEIRD_PASS_REPLY"; "CURLE_FTP_WEIRD_USER_REPLY"; "CURLE_FTP_WEIRD_PASV_REPLY"; "CURLE_FTP_WEIRD_227_FORMAT"; "CURLE_FTP_CANT_GET_HOST"; "CURLE_FTP_CANT_RECONNECT"; "CURLE_FTP_COULDNT_SET_BINARY"; "CURLE_PARTIAL_FILE"; "CURLE_FTP_COULDNT_RETR_FILE"; "CURLE_FTP_WRITE_ERROR"; "CURLE_FTP_QUOTE_ERROR"; "CURLE_HTTP_RETURNED_ERROR"; "CURLE_WRITE_ERROR"; "CURLE_MALFORMAT_USER"; "CURLE_FTP_COULDNT_STOR_FILE"; "CURLE_READ_ERROR"; "CURLE_OUT_OF_MEMORY"; "CURLE_OPERATION_TIMEOUTED"; "CURLE_FTP_COULDNT_SET_ASCII"; "CURLE_FTP_PORT_FAILED"; "CURLE_FTP_COULDNT_USE_REST"; "CURLE_FTP_COULDNT_GET_SIZE"; "CURLE_HTTP_RANGE_ERROR"; "CURLE_HTTP_POST_ERROR"; "CURLE_SSL_CONNECT_ERROR"; "CURLE_BAD_DOWNLOAD_RESUME"; "CURLE_FILE_COULDNT_READ_FILE"; "CURLE_LDAP_CANNOT_BIND"; "CURLE_LDAP_SEARCH_FAILED"; "CURLE_LIBRARY_NOT_FOUND"; "CURLE_FUNCTION_NOT_FOUND"; "CURLE_ABORTED_BY_CALLBACK"; "CURLE_BAD_FUNCTION_ARGUMENT"; "CURLE_BAD_CALLING_ORDER"; "CURLE_INTERFACE_FAILED"; "CURLE_BAD_PASSWORD_ENTERED"; "CURLE_TOO_MANY_REDIRECTS"; "CURLE_UNKNOWN_TELNET_OPTION"; "CURLE_TELNET_OPTION_SYNTAX"; "CURLE_SSL_PEER_CERTIFICATE"; "CURLE_GOT_NOTHING"; "CURLE_SSL_ENGINE_NOTFOUND"; "CURLE_SSL_ENGINE_SETFAILED"; "CURLE_SEND_ERROR"; "CURLE_RECV_ERROR"; "CURLE_SHARE_IN_USE"; "CURLE_SSL_CERTPROBLEM"; "CURLE_SSL_CIPHER"; "CURLE_SSL_CACERT"; "CURLE_BAD_CONTENT_ENCODING"; "CURLE_LDAP_INVALID_URL"; "CURLE_FILESIZE_EXCEEDED"; "CURLE_FTP_SSL_FAILED"; "CURLE_SEND_FAIL_REWIND"; "CURLE_SSL_ENGINE_INITFAILED"; "CURLE_LOGIN_DENIED"; "CURLE_TFTP_NOTFOUND"; "CURLE_TFTP_PERM"; "CURLE_REMOTE_DISK_FULL"; "CURLE_TFTP_ILLEGAL"; "CURLE_TFTP_UNKNOWNID"; "CURLE_REMOTE_FILE_EXISTS"; "CURLE_TFTP_NOSUCHUSER"; "CURLE_CONV_FAILED"; "CURLE_CONV_REQD"; "CURLE_SSL_CACERT_BADFILE"; "CURLE_REMOTE_FILE_NOT_FOUND"; "CURLE_SSH"; "CURLE_SSL_SHUTDOWN_FAILED"; "CURLE_AGAIN"; ] let pr fmt = Printf.ksprintf print_endline fmt let () = match List.tl @@ Array.to_list @@ Sys.argv with | [] | "c"::[] -> all |> List.iteri begin fun i s -> match s with | "CURLE_OK" -> pr " {\"%s\", %s}," s s | _ -> pr "#if HAVE_DECL_%s" s; pr "#if %s != %d" s i; pr "#warning error code mismatch: %s != %d" s i; pr "#endif"; pr " {\"%s\", %s}," s s; pr "#else"; pr " {\"%s\", -1}," s; pr"#endif"; end | "ml"::[] -> all |> List.iter (pr " | %s") | "configure"::[] -> Format.set_margin 80; Format.open_box 0; all |> List.iter (function "CURLE_OK" -> () | s -> Format.printf "%s,@ " s); Format.close_box (); | _ -> failwith "bad usage" ocurl-0.9.0/examples/000077500000000000000000000000001356304035200144635ustar00rootroot00000000000000ocurl-0.9.0/examples/Makefile.in000066400000000000000000000037311356304035200165340ustar00rootroot00000000000000### ### @configure_input@ ### .PHONY: clean .PRECIOUS: %.cmx %.cmo %.cmi .SUFFIXES: .ml .mli .cmx .cmi .cmo OCBYTE = @OCAMLC@ -thread OCOPT = @OCAMLOPT@ -thread FINDLIB = @OCAMLFIND@ FLAGS = -g -I .. LFLAGS = -g -I .. -ccopt -L.. OCURLLIB = curl.cma unix.cma threads.cma OCURLOPTLIB = curl.cmxa unix.cmxa threads.cmxa LWT_UNIX=@OCAML_PKG_lwt_unix@ LWT_PPX=@OCAML_PKG_lwt_ppx@ TARGETS = ocurl ominimal ossl ocurl_test_threads opar test_cb_exn test_memory_leaks test_enum ifneq (@OCAML_PKG_bytes@,no) TARGETS += oput endif ifneq ($(LWT_UNIX),no) TARGETS += test_lwt_unit ifneq ($(LWT_PPX),no) TARGETS += test_lwt endif endif ifeq (@OCAMLBEST@,opt) TARGETS += ocurl.opt ominimal.opt ossl.opt ocurl_test_threads.opt opar.opt test_cb_exn.opt test_memory_leaks.opt test_enum.opt ifneq (@OCAML_PKG_bytes@,no) TARGETS += oput.opt endif ifneq ($(LWT_UNIX),no) TARGETS += test_lwt_unit.opt ifneq ($(LWT_PPX),no) TARGETS += test_lwt.opt endif endif endif all: $(TARGETS) test_lwt: ../curl.cma ../curl_lwt.cmo test_lwt.ml $(FINDLIB) c -custom -linkpkg -package $(LWT_UNIX),$(LWT_PPX) $(LFLAGS) $^ -o $@ test_lwt.opt: ../curl.cmxa ../curl_lwt.cmx test_lwt.ml $(FINDLIB) opt -linkpkg -package $(LWT_UNIX),$(LWT_PPX) $(LFLAGS) $^ -o $@ test_lwt_unit: ../curl.cma ../curl_lwt.cmo test_lwt_unit.ml $(FINDLIB) c -custom -linkpkg -package $(LWT_UNIX) $(LFLAGS) $^ -o $@ test_lwt_unit.opt: ../curl.cmxa ../curl_lwt.cmx test_lwt_unit.ml $(FINDLIB) opt -linkpkg -package $(LWT_UNIX) $(LFLAGS) $^ -o $@ oput: ../curl.cma oput.ml $(FINDLIB) c -custom -package bytes,unix -linkpkg $(LFLAGS) $^ -o $@ oput.opt: ../curl.cmxa oput.ml $(FINDLIB) opt -package bytes,unix -linkpkg $(LFLAGS) $^ -o $@ %: %.cmo ../curl.cma $(OCBYTE) -custom $(LFLAGS) $(OCURLLIB) $< -o $@ %.opt: %.cmx ../curl.cmxa $(OCOPT) $(LFLAGS) $(OCURLOPTLIB) $< -o $@ .ml.cmx: $(OCOPT) -c $(FLAGS) $< -o $@ .mli.cmi: $(OCBYTE) -c $(FLAGS) $< -o $@ .ml.cmo: $(OCBYTE) -c $(FLAGS) $< -o $@ clean: @rm -f $(TARGETS) *.cm* *.o *.a ocurl-0.9.0/examples/Makefile.windows000066400000000000000000000016611356304035200176200ustar00rootroot00000000000000### ### @configure_input@ ### .SUFFIXES: .ml .mli .cmx .cmi .cmo .cmxa .cma .c .obj OCBYTE = ocamlc OCOPT = ocamlopt OC = ocamlc CC = ocamlc FLAGS = -I .. LFLAGS = -I .. OCURLLIB = -dllpath .. curl.cma OCURLOPTLIB = curl.cmxa TARGETS = ocurl.exe ocurl.opt.exe oput.exe oput.opt.exe ominimal.exe ominimal.opt.exe ossl.exe ossl.opt.exe omulti.exe omulti.opt.exe test_cb_exn.exe all: @$(MAKE) -f Makefile.windows depend @$(MAKE) -f Makefile.windows targets targets: $(TARGETS) %.exe: %.cmo $(OCBYTE) $(LFLAGS) $(OCURLLIB) $< -o $@ %.opt.exe: %.cmx $(OCOPT) $(LFLAGS) $(OCURLOPTLIB) $< -o $@ .ml.cmx: $(OCOPT) -c $(FLAGS) $< -o $@ .mli.cmi: $(OCBYTE) -c $(FLAGS) $< -o $@ .ml.cmo: $(OCBYTE) -c $(FLAGS) $< -o $@ clean: @del $(TARGETS) *~ *.cm* *.o *.a *.obj *.lib .depend core depend: @ocamldep *.mli *.ml > .depend ifeq ($(wildcard .depend),.depend) ifneq ($(MAKECMDGOALS),clean) include .depend endif endif ocurl-0.9.0/examples/ocurl.ml000066400000000000000000000022051356304035200161400ustar00rootroot00000000000000(* * ocurl.ml * * Copyright (c) 2003-2008, Lars Nilsson, *) let writer accum data = Buffer.add_string accum data; String.length data let showContent content = Printf.printf "%s" (Buffer.contents content); flush stdout let showInfo connection = Printf.printf "Time: %f\nURL: %s\n" (Curl.get_totaltime connection) (Curl.get_effectiveurl connection) let getContent connection url = Curl.set_url connection url; Curl.perform connection let _ = Curl.global_init Curl.CURLINIT_GLOBALALL; begin let result = Buffer.create 16384 and errorBuffer = ref "" in try let connection = Curl.init () in Curl.set_errorbuffer connection errorBuffer; Curl.set_writefunction connection (writer result); Curl.set_followlocation connection true; Curl.set_url connection Sys.argv.(1); Curl.perform connection; showContent result; showInfo connection; Curl.cleanup connection with | Curl.CurlException (reason, code, str) -> Printf.fprintf stderr "Error: %s\n" !errorBuffer | Failure s -> Printf.fprintf stderr "Caught exception: %s\n" s end; Curl.global_cleanup () ocurl-0.9.0/examples/ocurl_test_threads.ml000066400000000000000000000024431356304035200207150ustar00rootroot00000000000000(** Test threads and GC interaction in bindings ocamlopt -thread -c -I .. ocurl_test_threads.ml -o ocurl_test_threads.cmx ocamlopt -thread unix.cmxa threads.cmxa -I .. -ccopt -L.. curl.cmxa ocurl_test_threads.cmx -o ocurl_test_threads *) let read_file connection path = let id = (Thread.id (Thread.self ())) in Printf.printf "%u read_file %s...\n%!" id path; let received_size = ref 0L in let writefunction buffer = let buffer_size = String.length buffer in Printf.printf "W(%d)%!" buffer_size; received_size := Int64.add !received_size (Int64.of_int buffer_size); buffer_size in Curl.set_httpget connection true; Curl.set_url connection path; Curl.set_writefunction connection writefunction; Curl.perform connection; Printf.printf "%u done \n%!" id; match Curl.get_responsecode connection with | 200 -> !received_size | _ as code -> failwith (Printf.sprintf "read_file %d" code) let () = Curl.global_init Curl.CURLINIT_GLOBALALL; let f () = let connection = Curl.init () in let path = if Array.length Sys.argv > 1 then Sys.argv.(1) else "http://localhost:8080/files/test.tar.gz" in while true do ignore (read_file connection path) done in let a = Array.init 20 (fun _ -> Thread.create f ()) in Array.iter Thread.join a ocurl-0.9.0/examples/ominimal.ml000066400000000000000000000005641356304035200166270ustar00rootroot00000000000000(* * ominimal.ml * * Copyright (c) 2003-2008, Lars Nilsson, *) let _ = if (Array.length Sys.argv) = 2 then begin Curl.global_init Curl.CURLINIT_GLOBALALL; let connection = new Curl.handle in connection#set_url Sys.argv.(1); connection#perform; end else Printf.fprintf stderr "Usage: %s \n" Sys.argv.(0) ocurl-0.9.0/examples/omulti.ml000066400000000000000000000076051356304035200163360ustar00rootroot00000000000000(* * omulti.ml * * Copyright (c) 2009, ygrek, *) module M = Curl.Multi module Ev = Libevent let pr fmt = Printf.ksprintf print_endline fmt let finished mt = let rec loop n = match M.remove_finished mt with | None -> (*if n > 0 then pr "Removed %u handles" n*) () | Some _ -> loop (n+1) in loop 0 let loop_wait mt = pr "perform/wait"; while M.perform mt > 0 do ignore (M.wait mt) done; finished mt let events_base = Ev.init () let loop_async mt = pr "action/event"; let events = Hashtbl.create 32 in let on_event fd flags = let event = match flags with | Ev.READ -> M.EV_IN | Ev.WRITE -> M.EV_OUT | _ -> M.EV_AUTO in let _ = M.action mt fd event in finished mt in let evs = ref 0 in M.set_socket_function mt begin fun fd what -> List.iter (fun ev -> decr evs; Ev.del ev) (Hashtbl.find_all events fd); Hashtbl.remove events fd; let flags = match what with | M.POLL_REMOVE | M.POLL_NONE -> [] | M.POLL_IN -> [Ev.READ] | M.POLL_OUT -> [Ev.WRITE] | M.POLL_INOUT -> [Ev.READ;Ev.WRITE] in match flags with | [] -> finished mt | flags -> let ev = Ev.create () in Ev.set events_base ev fd flags ~persist:true on_event; Ev.add ev None; incr evs; Hashtbl.add events fd ev end; let _ = M.action_all mt in Ev.dispatch events_base; assert (0 = !evs); finished mt let loop_select mt = pr "action/select"; let in_fd = ref [] in let out_fd = ref [] in let on_event fd event = let _ = M.action mt fd event in finished mt in M.set_socket_function mt begin fun fd what -> in_fd := List.filter ((<>) fd) !in_fd; out_fd := List.filter ((<>) fd) !out_fd; match what with | M.POLL_REMOVE | M.POLL_NONE -> finished mt | M.POLL_IN -> in_fd := fd :: !in_fd | M.POLL_OUT -> out_fd := fd :: !out_fd | M.POLL_INOUT -> in_fd := fd :: !in_fd; out_fd := fd :: !out_fd end; let _ = M.action_all mt in while !in_fd <> [] || !out_fd <> [] do let (fdi,fdo,_) = Unix.select !in_fd !out_fd [] (-1.) in List.iter (fun fd -> on_event fd M.EV_IN) fdi; List.iter (fun fd -> on_event fd M.EV_OUT) fdo; done; finished mt let input_lines file = let ch = open_in file in let lines = ref [] in try while true do lines := input_line ch :: !lines done; [] with End_of_file -> close_in_noerr ch; List.rev !lines let () = let module A = Array in let func = ref None in let urls = let urls = ref [] in let n = ref 10 in let args = Arg.align ["-n",Arg.Set_int n," "; "-i",Arg.String (fun s -> urls := input_lines s @ !urls)," read urls from file"; "-l",Arg.String (fun s -> urls := s :: !urls)," fetch url"; "-m",Arg.String (function | "wait" -> func := Some loop_wait | "event" -> func := Some loop_async | "select" -> func := Some loop_select | s-> failwith (Printf.sprintf "unknown method : %s" s)), " loop method"; ] in Arg.parse args failwith "Options :"; match !urls with | [url] -> A.make !n url | l -> A.of_list l in (* if A.length urls = 0 then failwith "Specify urls to download"; *) let init url = let h = Curl.init () in Curl.set_url h url; Curl.set_writefunction h String.length; h in let cleanup h = Printf.printf "Time: %f Size: %Lu Speed: %.2f KB/s URL: %s\n" (Curl.get_totaltime h) (Int64.of_float (Curl.get_sizedownload h)) (Curl.get_speeddownload h /. 1024.) (Curl.get_effectiveurl h); Curl.cleanup h in let test loop = let hs = A.map init urls in let mt = M.create () in A.iter (M.add mt) hs; loop mt; A.iter cleanup hs; M.cleanup mt; pr "Finished"; in match !func with | None -> test loop_wait; test loop_select; test loop_async | Some f -> test f ocurl-0.9.0/examples/opar.ml000066400000000000000000000025521356304035200157620ustar00rootroot00000000000000(* * opar.ml * * Copyright (c) 2003-2008, Lars Nilsson, *) open Printf let show_progress fname conn = let bytes = Curl.get_sizedownload conn and total = Curl.get_contentlengthdownload conn in printf "%s : %.2f%%\n" fname (bytes /. total *. 100.0); flush stdout let writer fname conn accum data = (* show_progress fname conn; *) Buffer.add_string accum data; String.length data let save fname content = let fp = open_out_bin fname in Buffer.output_buffer fp content; close_out fp let get fname url () = let result = Buffer.create 16384 and conn = Curl.init () in Curl.set_writefunction conn (writer fname conn result); Curl.set_followlocation conn true; Curl.set_url conn url; Curl.perform conn; Curl.cleanup conn; save fname result let thread_get fname url = Thread.create (get fname url) () let make_fname i = sprintf "file%02d" (i+1) let rec join requests = match requests with | [] -> () | (fname, t) :: rest -> printf "Download done [%s]\n" fname; Thread.join t; join rest let _ = Curl.global_init Curl.CURLINIT_GLOBALALL; let requests = Array.mapi (fun i url -> let fname = make_fname i in (fname, thread_get fname url)) (Array.sub Sys.argv 1 (Array.length Sys.argv - 1)) in join (Array.to_list requests) ocurl-0.9.0/examples/oput.ml000066400000000000000000000016171356304035200160110ustar00rootroot00000000000000(* * oput.ml * * Copyright (c) 2003-2008, Lars Nilsson, *) let counter = ref 0 let reader file maxBytes = let buffer = Bytes.create maxBytes in let readBytes = input file buffer 0 maxBytes in if readBytes = 0 then "" else begin counter := !counter + readBytes; Bytes.sub_string buffer 0 readBytes end let _ = if Array.length Sys.argv = 3 then begin Curl.global_init Curl.CURLINIT_GLOBALNOTHING; begin let conn = Curl.init () and file = Sys.argv.(1) and location = Sys.argv.(2) in let fileContent = open_in file in Curl.set_upload conn true; Curl.set_url conn location; Curl.set_readfunction conn (reader fileContent); Curl.perform conn; Curl.cleanup conn; Printf.printf "Uploaded %d bytes\n" !counter end; Curl.global_cleanup () end else Printf.printf "Usage: oput \n" ocurl-0.9.0/examples/ossl.ml000066400000000000000000000007621356304035200160020ustar00rootroot00000000000000(* * ossl.ml * * Copyright (c) 2003-2008, Lars Nilsson, *) let () = if Array.length Sys.argv = 2 then begin Curl.global_init Curl.CURLINIT_GLOBALALL; let connection = Curl.init () in Curl.set_url connection Sys.argv.(1); Curl.set_sslverifypeer connection true; Curl.set_sslverifyhost connection Curl.SSLVERIFYHOST_HOSTNAME; Curl.perform connection end else Printf.fprintf stderr "Usage: %s \n" Sys.argv.(0) ocurl-0.9.0/examples/test_cb_exn.ml000066400000000000000000000012471356304035200173160ustar00rootroot00000000000000(* Copyright (c) 2013, Thomas Leonard, *) open Printf exception Abort let () = let open Curl in let connection = init () in let error_buffer = ref "" in set_writefunction connection (fun _ -> raise Abort); set_url connection "http://google.com"; set_errorbuffer connection error_buffer; let run () = try perform connection; with | CurlException (CURLE_WRITE_ERROR,_,_) -> printf "ok\n%!" | CurlException (error,_,name) -> printf "E: wrong error: %s %s : %s\n%!" name (Curl.strerror error) !error_buffer | exn -> printf "E: wrong error: %s\n%!" (Printexc.to_string exn) in run (); run (); cleanup connection ocurl-0.9.0/examples/test_enum.ml000066400000000000000000000007131356304035200170210ustar00rootroot00000000000000open Printf let printfn fmt = ksprintf print_endline fmt external check_enums : unit -> (int * int * string) array = "caml_curl_check_enums" let () = let ok = ref true in Array.iter begin fun (last_used,last,name) -> if last_used + 1 <> last then begin ok := false; printfn "%s : need update : used %d, last %d" name last_used last end else printfn "%s : ok" name end (check_enums ()); exit (if !ok then 0 else 1) ocurl-0.9.0/examples/test_lwt.ml000066400000000000000000000035331356304035200166660ustar00rootroot00000000000000(** curl lwt example *) open Printf let (@@) f x = f x let (|>) x f = f x let printfn fmt = ksprintf print_endline fmt let curl_setup_simple h = let open Curl in set_useragent h "Curl_lwt"; set_nosignal h true; set_connecttimeout h 5; set_timeout h 10; set_followlocation h false; set_maxredirs h 1; set_ipresolve h IPRESOLVE_V4; set_encoding h CURL_ENCODING_ANY let log_curl h code = let open Curl in let url = get_effectiveurl h in printfn "%3d %.2f %5.0fB URL: %s (%s)%s" (get_httpcode h) (get_totaltime h) (get_sizedownload h) (if get_httpcode h / 100 = 3 then sprintf "%s -> %s" url (get_redirecturl h) else url) (get_contenttype h) (match code with CURLE_OK -> "" | _ -> sprintf " %s (%d)" (strerror code) (errno code)) let download h = let b = Buffer.create 16 in Curl.set_writefunction h (fun s -> Buffer.add_string b s; String.length s); Lwt.bind (Curl_lwt.perform h) (fun code -> Lwt.return (code, Buffer.contents b)) let get url = let h = Curl.init () in Curl.set_url h url; curl_setup_simple h; begin try%lwt (* e.g. Canceled *) let%lwt (code,_body) = download h in log_curl h code; Lwt.return () (* do something with body *) with exn -> printfn "EXN %s URL: %s" (Printexc.to_string exn) url; Lwt.fail exn end[%lwt.finally Curl.cleanup h; Lwt.return ()] let urls = [ "http://www.forth.org.ru"; "http://caml.inria.fr"; "https://www.rust-lang.org"; "https://ocaml.org"; "http://elm-lang.org"; "http://www.red-lang.org"; ] let wait_one tasks = let%lwt () = Lwt_unix.sleep 0.5 in let%lwt () = Lwt.choose tasks in print_endline "Cancel remaining transfers"; Lwt.return () let () = printfn "Launch %d transfers" (List.length urls); let tasks = List.map get urls in Lwt_main.run @@ Lwt.pick [ wait_one tasks; Lwt.join tasks ] ocurl-0.9.0/examples/test_lwt_unit.ml000066400000000000000000000014231356304035200177210ustar00rootroot00000000000000(* Copyright (c) 2014, Thomas Leonard, *) open Curl open Printf let verbose = false let (|>) x f = f x let printfn fmt = ksprintf print_endline fmt let setup buf = let h = init () in set_url h "http://localhost:1/missing.png"; set_errorbuffer h buf; h let () = let buf1 = ref "" in let h = setup buf1 in (* easy *) let () = try perform h with CurlException (code,_,_) -> if verbose then printfn "Sync errors: %s <%s>" (strerror code) !buf1 in (* lwt *) let buf2 = ref "" in let h = setup buf2 in let code = Curl_lwt.perform h |> Lwt_main.run in if verbose then printfn "Lwt errors: %s <%s>" (strerror code) !buf2; if buf1 <> buf2 then (printfn "FAILED: %S <> %S" !buf1 !buf2; exit 1) else (printfn "OK"; exit 0) ocurl-0.9.0/examples/test_memory_leaks.ml000066400000000000000000000023071356304035200205450ustar00rootroot00000000000000open Curl let test1 size = let h = init () in let s1 = String.make size 'd' in set_private h s1; let s2 = String.make size 'c' in set_httppost h [CURLFORM_CONTENT ("part", s2, DEFAULT)]; assert (get_private h = s1); cleanup h let test2 size = let h = init () in let s = String.make size 'a' in set_mimepost h [{encoding=CURLMIME_BINARY;headers=[];subparts=[];data=CURLMIME_DATA s}]; let g = init () in cleanup h; cleanup g let rss () = let path = Printf.sprintf "/proc/%d/statm" (Unix.getpid ()) in try let ch = open_in path in let n = Scanf.fscanf ch "%_d %d" (fun x -> 4*1024*x) in close_in_noerr ch; n with exn -> Printf.eprintf "Error opening %s (%s), ignoring\n%!" path (Printexc.to_string exn); 0 let check test count leak_size = try let rss1 = rss () in for i = 0 to pred count do test leak_size; Gc.compact (); done; let rss2 = rss () in Printf.printf "RSS %d -> %d %s\n%!" rss1 rss2 (if rss2 - rss1 < count * leak_size / 10 then "OK" else "LEAKING") with Curl.NotImplemented s -> Printf.printf "skipping test : libcurl doesn't provide %s\n%!" s let () = let mb = 1024 * 1024 in check test1 200 mb; check test2 100 mb; () ocurl-0.9.0/install-sh000077500000000000000000000142531356304035200146560ustar00rootroot00000000000000#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do pathcomp=$pathcomp$1 shift if [ ! -d "$pathcomp" ] ; then $mkdirprog "$pathcomp" else : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename "$dst"` else : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/#inst.$$# rmtmp=$dstdir/#rm.$$# # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now remove or move aside any old file at destination location. We try this # two ways since rm can't unlink itself on some systems and the destination # file might be busy for other reasons. In this case, the final cleanup # might fail but the new file should still install successfully. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } ocurl-0.9.0/opam000066400000000000000000000016141356304035200135260ustar00rootroot00000000000000opam-version: "2.0" name: "ocurl" maintainer: "ygrek@autistici.org" homepage: "https://ygrek.org.ua/p/ocurl" license: "MIT" authors: [ "Lars Nilsson" "ygrek" ] doc: ["https://ygrek.org.ua/p/ocurl/api/index.html"] dev-repo: "git://github.com/ygrek/ocurl.git" bug-reports: "https://github.com/ygrek/ocurl/issues" tags: ["org:ygrek" "clib:curl"] build: [ ["./configure"] [make] [make "doc"] {with-doc} [make "test"] {with-test} ] install: [ [make "install"] ] depends: [ "ocamlfind" {build} "base-unix" "conf-libcurl" ] depopts: ["lwt" "lwt_ppx"] synopsis: "Bindings to libcurl" description: "libcurl is a client-side URL transfer library, supporting HTTP and a multitude of other network protocols (FTP/SMTP/RTSP/etc). This library wrap easy synchronous API (Curl), synchronous parallel and generic asynchronous API (Curl.Multi), and provides an Lwt-enabled asynchronous interface (Curl_lwt)." ocurl-0.9.0/print_ext.ml000066400000000000000000000003431356304035200152130ustar00rootroot00000000000000match List.tl (Array.to_list Sys.argv) with | ["dll"] -> print_endline Config.ext_dll | ["obj"] -> print_endline Config.ext_obj | ["lib"] -> print_endline Config.ext_lib | _ -> prerr_endline "print_ext.ml: wrong usage"; exit 2