kumquat-buildroot/package/libxmlrpc/libxmlrpc.mk
Thomas Petazzoni 90a6675e18 libxmlrpc: improve curl-config patch
The curl-config patch that makes sure to not use curl-config from the
PATH but the curl-config program specified at configure time was
forgetting a number of other places. So we change the strategy, and
make the configure.in script define a $CURL_CONFIG variable that can
be used in Makefiles where appropriate.

This means we need to run autoconf (but not AUTORECONF = YES since the
package uses autoconf but not automake).

This fixes build failures in cases where a curl-config program is in
the PATH. Fixes:

  http://autobuild.buildroot.org/results/06b/06b7eada721483eb57adde147768a1f306b7d0d7/
  (and many similar ones)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-12-27 18:46:51 +01:00

39 lines
1.4 KiB
Makefile

################################################################################
#
# libxmlrpc
#
################################################################################
LIBXMLRPC_VERSION = 1.25.30
LIBXMLRPC_SOURCE = xmlrpc-c-$(LIBXMLRPC_VERSION).tgz
LIBXMLRPC_SITE = http://downloads.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(LIBXMLRPC_VERSION)
LIBXMLRPC_LICENSE = BSD-3c (xml-rpc main code and abyss web server), BSD like (lib/expat), Python 1.5.2 license (parts of xmlrpc_base64.c)
LIBXMLRPC_LICENSE_FILES = doc/COPYING
LIBXMLRPC_INSTALL_STAGING = YES
LIBXMLRPC_DEPENDENCIES = libcurl host-autoconf
LIBXMLRPC_CONFIG_SCRIPTS = xmlrpc-c-config
LIBXMLRPC_MAKE = $(MAKE1)
# Using autoconf, not automake, so we cannot use AUTORECONF = YES.
define LIBXMLRPC_RUN_AUTOCONF
cd $(@D); $(HOST_DIR)/usr/bin/autoconf
endef
LIBXMLRPC_PRE_CONFIGURE_HOOKS += LIBXMLRPC_RUN_AUTOCONF
LIBXMLRPC_CONF_OPTS = \
$(if $(BR2_USE_WCHAR),,ac_cv_header_wchar_h=no) \
$(if $(BR2_INSTALL_LIBSTDCPP),,--disable-cplusplus) \
have_curl_config=$(STAGING_DIR)/usr/bin/curl-config \
CURL_CONFIG=$(STAGING_DIR)/usr/bin/curl-config
# Our package uses autoconf, but not automake, so we need to pass
# those variables at compile time as well.
LIBXMLRPC_MAKE_ENV = \
CC_FOR_BUILD="$(HOSTCC)" \
LD_FOR_BUILD="$(HOSTLD)" \
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)"
$(eval $(autotools-package))