cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: List available curl options

From: Jeroen Ooms <jeroenooms_at_gmail.com>
Date: Mon, 15 Dec 2014 17:39:09 -0800

On Mon, Dec 15, 2014 at 12:50 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> If the goal is to simply #ifdef code depending on which options are available,

No that is not the goal. In that case the LIBCURL_HAS macro would
suffice, no need for autoconf.

The goal is to create a list of all available options (name and
integer) during compile-time, so that the user in the scripting
language can name an arbitrary option as a string (say
"ACCEPT_ENCODING") at run-time. Then we can use this list to (1) check
if this option exists in the current version, and (2) use the list to
map that the string to the appropriate integer that we need to feed to
curl_easy_setopt. All at runtime.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-12-16