From bcc1d7910f668b76c53606df892b27b39522fdaa Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 07 Nov 2012 20:00:42 -0500 Subject: Merge branch 'feature/build-sys-arches'. --- (limited to 'lib/buildsystem') diff --git a/lib/buildsystem/autoconf.sh b/lib/buildsystem/autoconf.sh index 13370ae..a1ae3ea 100644 --- a/lib/buildsystem/autoconf.sh +++ b/lib/buildsystem/autoconf.sh @@ -27,9 +27,25 @@ _oh_autoconf_can_configure() _oh_autoconf_configure() { + _oh_local _ohbsbac_arch_opts + mkdir -p "${_OH_BUILDSYSTEM_BUILD_DIR}" cd "${_OH_BUILDSYSTEM_BUILD_DIR}" + _ohbsbac_arch_opts=" + --build='$(oh_buildsystem_arch "${OPK_BUILD_ARCH}" 'autoconf')' + " + if [ "${OPK_BUILD_ARCH}" != "${OPK_HOST_ARCH}" ]; then + _ohbsbac_arch_opts="${_ohbsbac_arch_opts} + --host='$(oh_buildsystem_arch \ + "${OPK_HOST_ARCH}" 'autoconf')'" + fi + if [ -n "${_OH_BUILDSYSTEM_TARGET_ARCH}" ]; then + _ohbsbac_arch_opts="${_ohbsbac_arch_opts} + --target='$(oh_buildsystem_arch \ + "${_OH_BUILDSYSTEM_TARGET_ARCH}" 'autoconf')'" + fi + "${_OH_BUILDSYSTEM_SOURCE_DIR}/configure" \ --prefix='/usr' \ --bindir='${prefix}/bin' \ @@ -41,14 +57,15 @@ _oh_autoconf_configure() --includedir='${prefix}/include' \ --infodir='${prefix}/share/info' \ --mandir='${prefix}/share/man' \ - --build="${OPK_BUILD_ARCH_GNU}" \ - $([ "${OPK_BUILD_ARCH}" != "${OPK_HOST_ARCH}" ] && \ - printf '%s' "--host=${OPK_HOST_ARCH_GNU}") \ + ${_ohbsbac_arch_opts} --disable-maintainer-mode \ --disable-dependency-tracking \ "${@}" cd "${_OH_BUILDSYSTEM_WORK_AREA}" + + _oh_return 0 + return ${?} } _oh_autoconf_can_build() -- cgit v0.9.1