-define Build/Configure/Default
- @(cd $(PKG_BUILD_DIR)/$(3); \
- [ -x configure ] && \
- $(2) \
- CPPFLAGS="-I$(STAGING_DIR)/host/include" \
- LDFLAGS="-L$(STAGING_DIR)/host/lib" \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --program-prefix="" \
- --program-suffix="" \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- $(DISABLE_NLS) \
- $(1); \
- true; \
+HOST_CONFIGURE_VARS = \
+ CFLAGS="$(HOST_CFLAGS)" \
+ CPPFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)" \
+ SHELL="$(BASH)"
+
+HOST_CONFIGURE_ARGS = \
+ --target=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --program-prefix="" \
+ --program-suffix="" \
+ --prefix=$(STAGING_DIR_HOST) \
+ --exec-prefix=$(STAGING_DIR_HOST) \
+ --sysconfdir=$(STAGING_DIR_HOST)/etc \
+ --localstatedir=$(STAGING_DIR_HOST)/var
+
+HOST_CONFIGURE_CMD = ./configure
+
+define Host/Configure/Default
+ (cd $(HOST_BUILD_DIR)/$(3); \
+ if [ -x configure ]; then \
+ $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/$(3)/ && \
+ $(2) \
+ $(HOST_CONFIGURE_CMD) \
+ $(HOST_CONFIGURE_VARS) \
+ $(HOST_CONFIGURE_ARGS) \
+ $(1); \
+ fi \