mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 16:48:49 -05:00
configure: added --disable-get-easy-options
To allow disabling of the curl_easy_option APIs in a build. Closes #5365
This commit is contained in:
parent
6ebe63fac2
commit
ad691b191a
18
configure.ac
18
configure.ac
@ -4830,6 +4830,24 @@ AC_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dnl ************************************************************
|
||||||
|
dnl disable the curl_easy_options API
|
||||||
|
dnl
|
||||||
|
AC_MSG_CHECKING([whether to support curl_easy_option*])
|
||||||
|
AC_ARG_ENABLE(get-easy-option,
|
||||||
|
AC_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
|
||||||
|
AC_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
|
||||||
|
[ case "$enableval" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options])
|
||||||
|
;;
|
||||||
|
*) AC_MSG_RESULT(yes)
|
||||||
|
;;
|
||||||
|
esac ],
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
)
|
||||||
|
|
||||||
dnl ************************************************************
|
dnl ************************************************************
|
||||||
dnl switch on/off alt-svc
|
dnl switch on/off alt-svc
|
||||||
dnl
|
dnl
|
||||||
|
@ -24,6 +24,11 @@ Disable the FILE protocol
|
|||||||
|
|
||||||
Disable the FTP (and FTPS) protocol
|
Disable the FTP (and FTPS) protocol
|
||||||
|
|
||||||
|
## CURL_DISABLE_GETOPTIONS
|
||||||
|
|
||||||
|
Disable the `curl_easy_options` API calls that lets users get information
|
||||||
|
about existing options to `curl_easy_setopt`.
|
||||||
|
|
||||||
## CURL_DISABLE_GOPHER
|
## CURL_DISABLE_GOPHER
|
||||||
|
|
||||||
Disable the GOPHER protocol.
|
Disable the GOPHER protocol.
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include "strcase.h"
|
#include "strcase.h"
|
||||||
#include "easyoptions.h"
|
#include "easyoptions.h"
|
||||||
|
|
||||||
|
#ifndef CURL_DISABLE_GETOPTIONS
|
||||||
|
|
||||||
/* Lookups easy options at runtime */
|
/* Lookups easy options at runtime */
|
||||||
static struct curl_easyoption *lookup(const char *name, CURLoption id)
|
static struct curl_easyoption *lookup(const char *name, CURLoption id)
|
||||||
{
|
{
|
||||||
@ -71,3 +73,23 @@ curl_easy_option_next(const struct curl_easyoption *prev)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
const struct curl_easyoption *curl_easy_option_by_name(const char *name)
|
||||||
|
{
|
||||||
|
(void)name;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct curl_easyoption *curl_easy_option_by_id (CURLoption id)
|
||||||
|
{
|
||||||
|
(void)id;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct curl_easyoption *
|
||||||
|
curl_easy_option_next(const struct curl_easyoption *prev)
|
||||||
|
{
|
||||||
|
(void)prev;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user