summaryrefslogtreecommitdiffstats
path: root/lib/buildsystem
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-07 20:00:42 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-07 20:00:42 (EST)
commitbcc1d7910f668b76c53606df892b27b39522fdaa (patch)
tree92c60a8e7d6b1b37b179222ba4c406790f4985da /lib/buildsystem
parente77b32854807af6ce6b532996380d2a6a09d1ba3 (diff)
parent02ff44fe4d963f290347568833846b7d8b5db854 (diff)
Merge branch 'feature/build-sys-arches'.
Diffstat (limited to 'lib/buildsystem')
-rw-r--r--lib/buildsystem/autoconf.sh23
1 files changed, 20 insertions, 3 deletions
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()