2014-02-11 10:09:16 +00:00
|
|
|
# This file sets up configure_args with common settings.
|
|
|
|
|
|
|
|
if [ -z "$build_style" -o "$build_style" = "gnu-configure" ]; then
|
2014-03-19 08:03:21 +00:00
|
|
|
export configure_args="--prefix=/usr --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --localstatedir=/var ${configure_args}"
|
2014-02-11 10:09:16 +00:00
|
|
|
fi
|
|
|
|
|
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-06-11 07:24:44 +00:00
|
|
|
if [ -z "$build_style" -o "$build_style" = "gnu-configure" ]; then
|
|
|
|
export configure_args+=" --libdir=/usr/lib32"
|
|
|
|
fi
|
2014-04-05 09:52:22 +00:00
|
|
|
fi
|
2014-02-11 10:09:16 +00:00
|
|
|
|
|
|
|
# Cross compilation vars
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
|
|
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
|
|
|
_AUTOCONFCACHEDIR=${XBPS_COMMONDIR}/environment/configure/autoconf_cache
|
|
|
|
|
2014-03-19 08:03:21 +00:00
|
|
|
# From now on all vars are exported to the environment
|
|
|
|
set -a
|
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
# 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
|
|
|
|
armv?l*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/arm-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/arm-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
i686*) . ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/ix86-common
|
|
|
|
;;
|
|
|
|
|
|
|
|
mips) . ${_AUTOCONFCACHEDIR}/endian-big
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
mipsel) . ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
|
|
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
x86_64*)
|
|
|
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
|
|
|
. ${_AUTOCONFCACHEDIR}/x86_64-linux
|
|
|
|
;;
|
|
|
|
|
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
unset _AUTOCONFCACHEDIR
|
2014-03-19 08:03:21 +00:00
|
|
|
|
|
|
|
set +a # vars are not exported to the environment anymore
|