2014-02-11 10:09:16 +00:00
|
|
|
# This file sets up configure_args with common settings.
|
|
|
|
|
2014-11-23 10:16:39 +00:00
|
|
|
if [ -n "$build_style" -a "$build_style" != "gnu-configure" ]; then
|
|
|
|
return 0
|
2014-02-11 10:09:16 +00:00
|
|
|
fi
|
|
|
|
|
2015-06-03 12:48:30 +00:00
|
|
|
export configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin
|
2015-05-22 12:14:58 +00:00
|
|
|
--mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var ${configure_args}"
|
2015-05-22 09:03:29 +00:00
|
|
|
|
2014-11-23 10:16:39 +00:00
|
|
|
. ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
|
|
|
|
export configure_args+=" --host=$XBPS_TRIPLET --build=$XBPS_TRIPLET"
|
|
|
|
|
2014-04-05 09:52:22 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
|
|
|
|
# on x86 use /usr/lib32 as libdir, but just as fake directory,
|
|
|
|
# because /usr/lib32 is a symlink to /usr/lib in void.
|
2014-11-23 10:16:39 +00:00
|
|
|
export configure_args+=" --libdir=/usr/lib32"
|
2014-04-05 09:52:22 +00:00
|
|
|
fi
|
2014-02-11 10:09:16 +00:00
|
|
|
|
2015-05-21 10:02:31 +00:00
|
|
|
_AUTOCONFCACHEDIR=${XBPS_COMMONDIR}/environment/configure/autoconf_cache
|
|
|
|
|
|
|
|
# From now on all vars are exported to the environment
|
|
|
|
set -a
|
|
|
|
|
|
|
|
# Read autoconf cache variables for native target.
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
# musl libc
|
|
|
|
*-musl) . ${_AUTOCONFCACHEDIR}/musl-linux
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-02-11 10:09:16 +00:00
|
|
|
# Cross compilation vars
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
2015-05-21 10:02:31 +00:00
|
|
|
set +a
|
2014-02-11 10:09:16 +00:00
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
|
2014-03-19 08:03:21 +00:00
|
|
|
export configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE "
|
2014-03-05 11:01:49 +00:00
|
|
|
|
2014-02-11 10:09:16 +00:00
|
|
|
# Read autoconf cache variables for cross target (taken from OE).
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
# musl libc
|
|
|
|
*-musl) . ${_AUTOCONFCACHEDIR}/common-linux
|
2015-05-21 09:47:46 +00:00
|
|
|
. ${_AUTOCONFCACHEDIR}/musl-linux
|
2014-02-11 10:09:16 +00:00
|
|
|
;;
|
|
|
|
# gnu libc
|
2014-02-14 13:37:18 +00:00
|
|
|
*) . ${_AUTOCONFCACHEDIR}/common-linux
|
|
|
|
. ${_AUTOCONFCACHEDIR}/common-glibc
|
2014-02-11 10:09:16 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Read apropiate autoconf cache files for target machine.
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2015-05-01 06:18:07 +00:00
|
|
|
armv5te*|armv?l*)
|
2014-02-11 10:09:16 +00:00
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/arm-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/arm-linux
|
|
|
|
;;
|
|
|
|
|
2015-03-30 16:06:55 +00:00
|
|
|
aarch64*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/aarch64-linux
|
|
|
|
;;
|
|
|
|
|
2014-02-11 10:09:16 +00:00
|
|
|
i686*) . ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/ix86-common
|
|
|
|
;;
|
|
|
|
|
|
|
|
mips) . ${_AUTOCONFCACHEDIR}/endian-big
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
2018-12-22 00:03:06 +00:00
|
|
|
mipshf*)
|
2017-11-14 18:39:02 +00:00
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-big
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
2015-11-26 14:38:44 +00:00
|
|
|
mipsel*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
2014-02-11 10:09:16 +00:00
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
x86_64*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/x86_64-linux
|
|
|
|
;;
|
|
|
|
|
2018-12-31 23:24:00 +00:00
|
|
|
ppc64le*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-linux
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc64-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
ppc64*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-big
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-linux
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc64-linux
|
|
|
|
;;
|
|
|
|
|
2020-04-29 22:50:29 +00:00
|
|
|
ppcle*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-linux
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc32-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
ppc*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-big
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc-linux
|
|
|
|
. ${_AUTOCONFCACHEDIR}/powerpc32-linux
|
|
|
|
;;
|
|
|
|
|
2014-02-11 10:09:16 +00:00
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
unset _AUTOCONFCACHEDIR
|
2014-03-19 08:03:21 +00:00
|
|
|
|
|
|
|
set +a # vars are not exported to the environment anymore
|