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
|
|
|
|
|
2020-12-27 00:02:15 +01:00
|
|
|
# Store args from template so they can be included last and override
|
|
|
|
# our defaults
|
|
|
|
TEMPLATE_CONFIGURE_ARGS="${configure_args}"
|
|
|
|
|
2015-06-03 14:48:30 +02:00
|
|
|
export configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin
|
2020-12-27 00:02:15 +01:00
|
|
|
--mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var"
|
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"
|
|
|
|
|
2020-12-22 22:06:08 +01:00
|
|
|
# Always use wordsize-specific libdir even though the real path is lib
|
|
|
|
# This is to make sure 32-bit and 64-bit libs can coexist when looking
|
|
|
|
# up things (the opposite-libdir is always symlinked as libNN)
|
2021-02-05 20:22:52 +01:00
|
|
|
export configure_args+=" --libdir=\${exec_prefix}/lib${XBPS_TARGET_WORDSIZE}"
|
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
|
2020-12-27 00:02:15 +01:00
|
|
|
export configure_args+=" ${TEMPLATE_CONFIGURE_ARGS}"
|
|
|
|
unset TEMPLATE_CONFIGURE_ARGS
|
|
|
|
|
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
|
|
|
|
2020-12-27 00:02:15 +01:00
|
|
|
export configure_args+=" ${TEMPLATE_CONFIGURE_ARGS}"
|
|
|
|
unset TEMPLATE_CONFIGURE_ARGS
|
|
|
|
|
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
|