ncftp: fix cross-compilation test
authorRomain Naour <romain.naour@openwide.fr>
Fri, 21 Feb 2014 21:00:52 +0000 (22:00 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 21 Feb 2014 23:40:54 +0000 (00:40 +0100)
The cross-compilation test is based on the ability to run
a test program on the host, which is wrong.

If it runs, then the configure script concludes
that we're doing native compilation,
if it doesn't run, we're doing cross-compilation.

The configure script needs to be regenerated to fix the
cross-compilation test.

Fixes
http://autobuild.buildroot.net/results/969/969a49ae97a50634ea846a82b9c360e4fb020ace/build-end.log

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ncftp/ncftp.mk

index ff6c70a0f2fcb30686c3638bb23acbbf9580fc84..841c82ba1c9bc2103e6d762d201d29eb025a8d22 100644 (file)
@@ -11,6 +11,14 @@ NCFTP_TARGET_BINS = ncftp
 NCFTP_LICENSE = Clarified Artistic License
 NCFTP_LICENSE_FILES = doc/LICENSE.txt
 
+NCFTP_DEPENDENCIES = host-autoconf
+
+define NCFTP_RUN_AUTOCONF
+       (cd $(@D); $(HOST_DIR)/usr/bin/autoconf -I$(@D)/autoconf_local/)
+endef
+
+NCFTP_PRE_CONFIGURE_HOOKS += NCFTP_RUN_AUTOCONF
+
 ifeq ($(BR2_PACKAGE_NCFTP_GET),y)
        NCFTP_TARGET_BINS += ncftpget
 endif