summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2022-07-19 15:06:26 +0000
committerViktor Szakats <commit@vsz.me>2022-07-19 15:12:19 +0000
commit4d73854462f30948acab12984b611e9e33ee41e6 (patch)
tree68557e38c80d75ac1c67b37727d34724dc785906 /acinclude.m4
parent6e83e27f6cfa0ecf0b3eed547121d471aef46854 (diff)
downloadcurl-4d73854462f30948acab12984b611e9e33ee41e6.tar.gz
tidy-up: delete unused build configuration macros
Most of them feature guards: - `CURL_INCLUDES_SYS_UIO` [1] - `HAVE_ALLOCA_H` [2] - `HAVE_CRYPTO_CLEANUP_ALL_EX_DATA` (unused since de71e68000c8624ea13f90b136f8734dd0fb1bdc) - `HAVE_DLFCN_H` - `HAVE_DLOPEN` - `HAVE_DOPRNT` - `HAVE_FCNTL` - `HAVE_GETHOSTBYNAME` [3] - `HAVE_GETOPT_H` - `HAVE_GETPASS` - `HAVE_GETPROTOBYNAME` - `HAVE_GETSERVBYNAME` - `HAVE_IDN_FREE*` - `HAVE_INET_ADDR` - `HAVE_IOCTL` - `HAVE_KRB4` - `HAVE_KRB_GET_OUR_IP_FOR_REALM` - `HAVE_KRB_H` - `HAVE_LDAPSSL_H` - `HAVE_LDAP_INIT_FD` - `HAVE_LIBDL` - `HAVE_LIBNSL` - `HAVE_LIBRESOLV*` - `HAVE_LIBUCB` - `HAVE_LL` - `HAVE_LOCALTIME_R` - `HAVE_MALLOC_H` - `HAVE_MEMCPY` - `HAVE_MEMORY_H` - `HAVE_NETINET_IF_ETHER_H` - `HAVE_NI_WITHSCOPEID` - `HAVE_OPENSSL_CRYPTO_H` - `HAVE_OPENSSL_ERR_H` - `HAVE_OPENSSL_PEM_H` - `HAVE_OPENSSL_PKCS12_H` - `HAVE_OPENSSL_RAND_H` - `HAVE_OPENSSL_RSA_H` - `HAVE_OPENSSL_SSL_H` - `HAVE_OPENSSL_X509_H` - `HAVE_PEM_H` - `HAVE_POLL` - `HAVE_RAND_SCREEN` - `HAVE_RAND_STATUS` - `HAVE_RECVFROM` - `HAVE_SETSOCKOPT` - `HAVE_SETVBUF` - `HAVE_SIZEOF_LONG_DOUBLE` - `HAVE_SOCKIO_H` - `HAVE_SOCK_OPTS` - `HAVE_STDIO_H` - `HAVE_STRCASESTR` - `HAVE_STRFTIME` - `HAVE_STRLCAT` - `HAVE_STRNCMPI` - `HAVE_STRNICMP` - `HAVE_STRSTR` - `HAVE_STRUCT_IN6_ADDR` - `HAVE_TLD_H` - `HAVE_TLD_STRERROR` - `HAVE_UNAME` - `HAVE_USLEEP` - `HAVE_WINBER_H` - `HAVE_WRITEV` - `HAVE_X509_H` - `LT_OBJDIR` - `NEED_BASENAME_PROTO` - `NOT_NEED_LIBNSL` - `OPENSSL_NO_KRB5` - `RECVFROM_TYPE*` - `SIZEOF_LONG_DOUBLE` - `STRERROR_R_TYPE_ARG3` - `USE_YASSLEMUL` - `_USRDLL` (from CMake) [4] [1] Related parts in `m4/curl-functions.m4` and `configure.ac` might also be deleted. [2] Related comment can possibly be deleted in `packages/vms/generate_config_vms_h_curl.com`. [3] There are more instances of this in autotools, but I did not dare to touch those. Looked like it's used to detect socket support. [4] This is necessary for MFC (Microsoft Foundation Class) DLLs to force linking MFC components statically to the DLL. `libcurl.dll` does not use MFC, so we can delete this define. Ref: https://docs.microsoft.com/cpp/build/regular-dlls-statically-linked-to-mfc Script that can help finding unused settings like above: ```shell autoheader configure.ac # generate lib/curl_config.h.in { grep -o -E 'set\([A-Z][A-Z0-9_]{3,}' CMake/Platforms/WindowsCache.cmake | sed -E 's|set\(||g' grep -o -E -h '#define +[A-Z][A-Z0-9_]{3,}' lib/config-*.h | sed -E 's|#define +||g' grep -o -E '#cmakedefine +[A-Z][A-Z0-9_]{3,}' lib/curl_config.h.cmake | sed -E 's|#cmakedefine +||g' grep -o -E '#undef +[A-Z][A-Z0-9_]{3,}' lib/curl_config.h.in | sed -E 's|#undef +||g' } | sort -u | grep -v -F 'HEADER_CURL_' | while read -r def; do c="$(git grep -w -F "${def}" | grep -v -E -c '(/libcurl\.tmpl|^lib/config-|^lib/curl_config\.h\.cmake|^CMakeLists\.txt|^CMake/Platforms/WindowsCache\.cmake|^packages/vms/config_h\.com|^m4/curl-functions\.m4|^acinclude\.m4|^configure\.ac)')" if [ "${c}" = '0' ]; then echo "${def}" fi done ``` Reviewed-by: Daniel Stenberg Closes #9044
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m4196
1 files changed, 0 insertions, 196 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 313f4c696..1d9a30bfc 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -385,48 +385,6 @@ AC_DEFUN([CURL_CHECK_HEADER_WINLDAP], [
])
-dnl CURL_CHECK_HEADER_WINBER
-dnl -------------------------------------------------
-dnl Check for compilable and valid winber.h header
-
-AC_DEFUN([CURL_CHECK_HEADER_WINBER], [
- AC_REQUIRE([CURL_CHECK_HEADER_WINLDAP])dnl
- AC_CACHE_CHECK([for winber.h], [curl_cv_header_winber_h], [
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#endif
-#include <winldap.h>
-#include <winber.h>
- ]],[[
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINBER_H shall not be defined.
-#else
- BERVAL *bvp = NULL;
- BerElement *bep = ber_init(bvp);
- ber_free(bep, 1);
-#endif
- ]])
- ],[
- curl_cv_header_winber_h="yes"
- ],[
- curl_cv_header_winber_h="no"
- ])
- ])
- case "$curl_cv_header_winber_h" in
- yes)
- AC_DEFINE_UNQUOTED(HAVE_WINBER_H, 1,
- [Define to 1 if you have the winber.h header file.])
- ;;
- esac
-])
-
-
dnl CURL_CHECK_HEADER_LBER
dnl -------------------------------------------------
dnl Check for compilable and valid lber.h header,
@@ -602,58 +560,6 @@ AC_DEFUN([CURL_CHECK_HEADER_LDAP_SSL], [
])
-dnl CURL_CHECK_HEADER_LDAPSSL
-dnl -------------------------------------------------
-dnl Check for compilable and valid ldapssl.h header
-
-AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [
- AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl
- AC_CACHE_CHECK([for ldapssl.h], [curl_cv_header_ldapssl_h], [
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
-#include <ldapssl.h>
- ]],[[
- char *cert_label = NULL;
- LDAP *ldp = ldap_ssl_init("dummy", LDAPS_PORT, cert_label);
- ]])
- ],[
- curl_cv_header_ldapssl_h="yes"
- ],[
- curl_cv_header_ldapssl_h="no"
- ])
- ])
- case "$curl_cv_header_ldapssl_h" in
- yes)
- AC_DEFINE_UNQUOTED(HAVE_LDAPSSL_H, 1,
- [Define to 1 if you have the ldapssl.h header file.])
- ;;
- esac
-])
-
-
dnl CURL_CHECK_LIBS_WINLDAP
dnl -------------------------------------------------
dnl Check for libraries needed for WINLDAP support,
@@ -858,108 +764,6 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
])
-dnl CURL_CHECK_HEADER_MALLOC
-dnl -------------------------------------------------
-dnl Check for compilable and valid malloc.h header,
-dnl and check if it is needed even with stdlib.h
-
-AC_DEFUN([CURL_CHECK_HEADER_MALLOC], [
- AC_CACHE_CHECK([for malloc.h], [curl_cv_header_malloc_h], [
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <malloc.h>
- ]],[[
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
- ]])
- ],[
- curl_cv_header_malloc_h="yes"
- ],[
- curl_cv_header_malloc_h="no"
- ])
- ])
- if test "$curl_cv_header_malloc_h" = "yes"; then
- AC_DEFINE_UNQUOTED(HAVE_MALLOC_H, 1,
- [Define to 1 if you have the malloc.h header file.])
- #
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <stdlib.h>
- ]],[[
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
- ]])
- ],[
- curl_cv_need_header_malloc_h="no"
- ],[
- curl_cv_need_header_malloc_h="yes"
- ])
- #
- case "$curl_cv_need_header_malloc_h" in
- yes)
- AC_DEFINE_UNQUOTED(NEED_MALLOC_H, 1,
- [Define to 1 if you need the malloc.h header file even with stdlib.h])
- ;;
- esac
- fi
-])
-
-
-dnl CURL_CHECK_HEADER_MEMORY
-dnl -------------------------------------------------
-dnl Check for compilable and valid memory.h header,
-dnl and check if it is needed even with stdlib.h for
-dnl memory related functions.
-
-AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [
- AC_CACHE_CHECK([for memory.h], [curl_cv_header_memory_h], [
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <memory.h>
- ]],[[
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
- ]])
- ],[
- curl_cv_header_memory_h="yes"
- ],[
- curl_cv_header_memory_h="no"
- ])
- ])
- if test "$curl_cv_header_memory_h" = "yes"; then
- AC_DEFINE_UNQUOTED(HAVE_MEMORY_H, 1,
- [Define to 1 if you have the memory.h header file.])
- #
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <stdlib.h>
- ]],[[
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
- ]])
- ],[
- curl_cv_need_header_memory_h="no"
- ],[
- curl_cv_need_header_memory_h="yes"
- ])
- #
- case "$curl_cv_need_header_memory_h" in
- yes)
- AC_DEFINE_UNQUOTED(NEED_MEMORY_H, 1,
- [Define to 1 if you need the memory.h header file even with stdlib.h])
- ;;
- esac
- fi
-])
-
dnl TYPE_SOCKADDR_STORAGE
dnl -------------------------------------------------
dnl Check for struct sockaddr_storage. Most IPv6-enabled