summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-08 12:56:40 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-08 12:56:40 (EST)
commit11d3d0e4a22a657b709dbdc2dae832a5e38d1278 (patch)
tree459e25ed9341e92ac4516bb59ca96fe30eaab945
parent8486d0197ae2f62317e960cdb91845f92ddea775 (diff)
Optionally use multiarch lib paths in packages.
-rwxr-xr-xconfigure7
-rw-r--r--lib/buildsystem/Makefile.in4
-rw-r--r--lib/buildsystem/autoconf.sh12
3 files changed, 19 insertions, 4 deletions
diff --git a/configure b/configure
index 4427908..c6b7a91 100755
--- a/configure
+++ b/configure
@@ -31,6 +31,7 @@ datadir='${prefix}/share'
mandir='${datadir}/man'
localedir='${datadir}/locale'
libopkhelper='${libdir}/libopkhelper.3.0'
+multiarch_libdir='false'
quiet='false'
missing_deps='false'
@@ -58,6 +59,7 @@ ${dep_cmds}
${dep_libs}
${opt_dep_cmds}
${opt_dep_libs}
+multiarch-libdir
"
subst_vars="
@@ -156,6 +158,11 @@ Installation directories:
--localedir=LOCALEDIR install locales in LOCALEDIR
default: DATADIR/locale
+Features:
+ --with-multiarch-libdir=BOOL
+ use multiarch library paths in packages
+ default: false
+
Dependencies:
--with-sh=PATH use sh at PATH
--with-libopkbuild.1=PATH
diff --git a/lib/buildsystem/Makefile.in b/lib/buildsystem/Makefile.in
index abc59ff..3138aff 100644
--- a/lib/buildsystem/Makefile.in
+++ b/lib/buildsystem/Makefile.in
@@ -24,9 +24,11 @@ srcdir = @srcdir@
prefix = @prefix@
libdir = @libdir@
libopkhelper = @libopkhelper@
+multiarch_libdir = @multiarch_libdir@
sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\
- s&@@PACKAGE_VERSION@@&$(package_version)&;
+ s&@@PACKAGE_VERSION@@&$(package_version)&;\
+ s&@@MULTIARCH_LIBDIR@@&$(multiarch_libdir)&;
.SUFFIXES:
.SUFFIXES: .sh .sm
diff --git a/lib/buildsystem/autoconf.sh b/lib/buildsystem/autoconf.sh
index 36b706e..9e76c1c 100644
--- a/lib/buildsystem/autoconf.sh
+++ b/lib/buildsystem/autoconf.sh
@@ -27,7 +27,7 @@ _oh_autoconf_can_configure()
_oh_autoconf_configure()
{
- _oh_local _ohbsbac_arch_opts _ohbsbac_rc
+ _oh_local _ohbsbac_arch_opts _ohbsbac_libdir _ohbsbac_rc
mkdir -p "${_OH_BUILDSYSTEM_BUILD_DIR}"
cd "${_OH_BUILDSYSTEM_BUILD_DIR}"
@@ -46,14 +46,20 @@ _oh_autoconf_configure()
"${_OH_BUILDSYSTEM_TARGET_ARCH}" 'autoconf')'"
fi
+ if [ '@@MULTIARCH_LIBDIR@@' = 'true' ]; then
+ _ohbsbac_libdir='${prefix}/lib/'"${OPK_HOST_ARCH}"
+ else
+ _ohbsbac_libdir='${prefix}/lib/'
+ fi
+
"${_OH_BUILDSYSTEM_SOURCE_DIR}/configure" \
--prefix='/usr' \
--bindir='${prefix}/bin' \
--sbindir='${prefix}/sbin' \
- --libexecdir='${prefix}/lib' \
+ --libexecdir="${_ohbsbac_libdir}" \
--sysconfdir='/etc' \
--localstatedir='/var' \
- --libdir='${prefix}/lib' \
+ --libdir="${_ohbsbac_libdir}" \
--includedir='${prefix}/include' \
--infodir='${prefix}/share/info' \
--mandir='${prefix}/share/man' \