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>
This commit is contained in:
Thomas Petazzoni
2014-12-27 17:25:55 +01:00
parent 7b5de43a03
commit 90a6675e18
2 changed files with 86 additions and 5 deletions

View File

@@ -10,10 +10,17 @@ LIBXMLRPC_SITE = http://downloads.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Su
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
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) \