2014-02-11 11:09:16 +01:00
|
|
|
# This file sets up configure_args with common settings.
|
|
|
|
|
2014-11-23 11:16:39 +01:00
|
|
|
if [ -n "$build_style" -a "$build_style" != "gnu-configure" ]; then
|
|
|
|
return 0
|
2014-02-11 11:09:16 +01:00
|
|
|
fi
|
|
|
|
|
2015-06-03 14:48:30 +02:00
|
|
|
export configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin
|
2015-05-22 14:14:58 +02:00
|
|
|
--mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var ${configure_args}"
|
2015-05-22 11:03:29 +02:00
|
|
|
|
2014-11-23 11:16:39 +01:00
|
|
|
. ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
|
|
|
|
export configure_args+=" --host=$XBPS_TRIPLET --build=$XBPS_TRIPLET"
|
|
|
|
|
2014-04-05 11:52:22 +02: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 11:16:39 +01:00
|
|
|
export configure_args+=" --libdir=/usr/lib32"
|
2014-04-05 11:52:22 +02:00
|
|
|
fi
|
2014-02-11 11:09:16 +01:00
|
|
|
|
2015-05-21 12:02:31 +02: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 11:09:16 +01:00
|
|
|
# Cross compilation vars
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
2015-05-21 12:02:31 +02:00
|
|
|
set +a
|
2014-02-11 11:09:16 +01:00
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
|
2014-03-19 09:03:21 +01:00
|
|
|
export configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE "
|
2014-03-05 12:01:49 +01:00
|
|
|
|
2014-02-11 11:09:16 +01: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 11:47:46 +02:00
|
|
|
. ${_AUTOCONFCACHEDIR}/musl-linux
|
2014-02-11 11:09:16 +01:00
|
|
|
;;
|
|
|
|
# gnu libc
|
2014-02-14 14:37:18 +01:00
|
|
|
*) . ${_AUTOCONFCACHEDIR}/common-linux
|
|
|
|
. ${_AUTOCONFCACHEDIR}/common-glibc
|
2014-02-11 11:09:16 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Read apropiate autoconf cache files for target machine.
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2015-05-01 08:18:07 +02:00
|
|
|
armv5te*|armv?l*)
|
2014-02-11 11:09:16 +01:00
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/arm-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/arm-linux
|
|
|
|
;;
|
|
|
|
|
2015-03-30 18:06:55 +02:00
|
|
|
aarch64*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/aarch64-linux
|
|
|
|
;;
|
|
|
|
|
2014-02-11 11:09:16 +01:00
|
|
|
i686*) . ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/ix86-common
|
|
|
|
;;
|
|
|
|
|
|
|
|
mips) . ${_AUTOCONFCACHEDIR}/endian-big
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
2018-12-22 01:03:06 +01:00
|
|
|
mipshf*)
|
2017-11-14 19:39:02 +01:00
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-big
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
2015-11-26 15:38:44 +01:00
|
|
|
mipsel*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
2014-02-11 11:09:16 +01:00
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
x86_64*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/x86_64-linux
|
|
|
|
;;
|
|
|
|
|
2019-01-01 00:24:00 +01: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-30 00:50:29 +02: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 11:09:16 +01:00
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
unset _AUTOCONFCACHEDIR
|
2014-03-19 09:03:21 +01:00
|
|
|
|
|
|
|
set +a # vars are not exported to the environment anymore
|