haserl: fix lua support build on hosts without lua development package
authorPeter Korsgaard <jacmet@sunsite.dk>
Thu, 5 Apr 2012 19:11:00 +0000 (21:11 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 5 Apr 2012 19:38:48 +0000 (21:38 +0200)
Abuse lua2c_LDFLAGS to pass the correct host cflags/ldflags when lua2c
is built for the host.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/haserl/haserl.mk

index c8a88add8b6c3ea8d034799b3fd2bab7e851ace8..dfe4cf0bf83b5745fd0bf1baf6fa06b080408a21 100644 (file)
@@ -10,7 +10,9 @@ HASERL_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ha
 ifeq ($(BR2_PACKAGE_HASERL_WITH_LUA),y)
        HASERL_CONF_OPT += --with-lua=$(STAGING_DIR) \
                --with-lua-headers=$(STAGING_DIR)
-       HASERL_DEPENDENCIES += lua
+       HASERL_DEPENDENCIES += lua host-lua
+       # lua2c is built for host, so needs to find host libs/headers
+       HASERL_MAKE_OPT += lua2c_LDFLAGS='$(HOST_CFLAGS) $(HOST_LDFLAGS)'
 endif
 
 define HASERL_REMOVE_EXAMPLES