libgtk3: remove non-existent configure options
[buildroot-gz.git] / package / libcurl / libcurl.mk
blob0249f5c53dd7ab7b7b9e024a27ff6f73fc4ee94a
1 ################################################################################
3 # libcurl
5 ################################################################################
7 LIBCURL_VERSION = 7.53.1
8 LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2
9 LIBCURL_SITE = https://curl.haxx.se/download
10 LIBCURL_DEPENDENCIES = host-pkgconf \
11 $(if $(BR2_PACKAGE_ZLIB),zlib) \
12 $(if $(BR2_PACKAGE_LIBIDN),libidn) \
13 $(if $(BR2_PACKAGE_RTMPDUMP),rtmpdump)
14 LIBCURL_LICENSE = ISC
15 LIBCURL_LICENSE_FILES = COPYING
16 LIBCURL_INSTALL_STAGING = YES
18 # We disable NTLM support because it uses fork(), which doesn't work
19 # on non-MMU platforms. Moreover, this authentication method is
20 # probably almost never used. See
21 # http://curl.haxx.se/docs/manpage.html#--ntlm.
22 LIBCURL_CONF_OPTS = --disable-manual --disable-ntlm-wb \
23 --enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug
25 ifeq ($(BR2_PACKAGE_LIBCURL_VERBOSE),y)
26 LIBCURL_CONF_OPTS += --enable-verbose
27 else
28 LIBCURL_CONF_OPTS += --disable-verbose
29 endif
31 LIBCURL_CONFIG_SCRIPTS = curl-config
33 ifeq ($(BR2_PACKAGE_OPENSSL),y)
34 LIBCURL_DEPENDENCIES += openssl
35 LIBCURL_CONF_ENV += ac_cv_lib_crypto_CRYPTO_lock=yes
36 # configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up
37 # native stuff during the rest of configure when target == host.
38 # Fix it by setting LD_LIBRARY_PATH to something sensible so those libs
39 # are found first.
40 LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)/lib:/usr/lib
41 LIBCURL_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr \
42 --with-ca-path=/etc/ssl/certs
43 else ifeq ($(BR2_PACKAGE_GNUTLS),y)
44 LIBCURL_CONF_OPTS += --with-gnutls=$(STAGING_DIR)/usr
45 LIBCURL_DEPENDENCIES += gnutls
46 else ifeq ($(BR2_PACKAGE_LIBNSS),y)
47 LIBCURL_CONF_OPTS += --with-nss=$(STAGING_DIR)/usr
48 LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`"
49 LIBCURL_DEPENDENCIES += libnss
50 else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
51 LIBCURL_CONF_OPTS += --with-mbedtls=$(STAGING_DIR)/usr
52 LIBCURL_DEPENDENCIES += mbedtls
53 else
54 LIBCURL_CONF_OPTS += --without-ssl --without-gnutls \
55 --without-polarssl --without-nss --without-mbedtls
56 endif
58 ifeq ($(BR2_PACKAGE_C_ARES),y)
59 LIBCURL_DEPENDENCIES += c-ares
60 LIBCURL_CONF_OPTS += --enable-ares
61 else
62 LIBCURL_CONF_OPTS += --disable-ares
63 endif
65 # Configure curl to support libssh2
66 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
67 LIBCURL_DEPENDENCIES += libssh2
68 LIBCURL_CONF_OPTS += --with-libssh2
69 else
70 LIBCURL_CONF_OPTS += --without-libssh2
71 endif
73 define LIBCURL_FIX_DOT_PC
74 printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in
75 endef
76 LIBCURL_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_OPENSSL),LIBCURL_FIX_DOT_PC)
78 ifeq ($(BR2_PACKAGE_CURL),)
79 define LIBCURL_TARGET_CLEANUP
80 rm -rf $(TARGET_DIR)/usr/bin/curl
81 endef
82 LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
83 endif
85 $(eval $(autotools-package))