void-packages

Void Source Packages
git clone git://ezup.dev/void-packages.git
Log | Files | Refs | README | LICENSE

gnu-configure-args.sh (3460B)


      1# This file sets up configure_args with common settings.
      2
      3if [ -n "$build_style" -a "$build_style" != "gnu-configure" ]; then
      4	return 0
      5fi
      6
      7# Store args from template so they can be included last and override
      8# our defaults
      9TEMPLATE_CONFIGURE_ARGS="${configure_args}"
     10
     11export configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin
     12 --mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var"
     13
     14. ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
     15export configure_args+=" --host=$XBPS_TRIPLET --build=$XBPS_TRIPLET"
     16
     17# Always use wordsize-specific libdir even though the real path is lib
     18# This is to make sure 32-bit and 64-bit libs can coexist when looking
     19# up things (the opposite-libdir is always symlinked as libNN)
     20export configure_args+=" --libdir=\${exec_prefix}/lib${XBPS_TARGET_WORDSIZE}"
     21
     22_AUTOCONFCACHEDIR=${XBPS_COMMONDIR}/environment/configure/autoconf_cache
     23
     24# From now on all vars are exported to the environment
     25set -a
     26
     27# Read autoconf cache variables for native target.
     28case "$XBPS_TARGET_MACHINE" in
     29	# musl libc
     30	*-musl) . ${_AUTOCONFCACHEDIR}/musl-linux
     31		;;
     32esac
     33
     34# Cross compilation vars
     35if [ -z "$CROSS_BUILD" ]; then
     36	export configure_args+=" ${TEMPLATE_CONFIGURE_ARGS}"
     37	unset TEMPLATE_CONFIGURE_ARGS
     38
     39	set +a
     40	return 0
     41fi
     42
     43export configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE "
     44
     45export configure_args+=" ${TEMPLATE_CONFIGURE_ARGS}"
     46unset TEMPLATE_CONFIGURE_ARGS
     47
     48# Read autoconf cache variables for cross target (taken from OE).
     49case "$XBPS_TARGET_MACHINE" in
     50	# musl libc
     51	*-musl) . ${_AUTOCONFCACHEDIR}/common-linux
     52		. ${_AUTOCONFCACHEDIR}/musl-linux
     53		;;
     54	# gnu libc
     55	*)	. ${_AUTOCONFCACHEDIR}/common-linux
     56		. ${_AUTOCONFCACHEDIR}/common-glibc
     57		;;
     58esac
     59
     60# Read apropiate autoconf cache files for target machine.
     61case "$XBPS_TARGET_MACHINE" in
     62	armv5te*|armv?l*)
     63		. ${_AUTOCONFCACHEDIR}/endian-little
     64		. ${_AUTOCONFCACHEDIR}/arm-common
     65		. ${_AUTOCONFCACHEDIR}/arm-linux
     66		;;
     67
     68	aarch64*)
     69		. ${_AUTOCONFCACHEDIR}/endian-little
     70		. ${_AUTOCONFCACHEDIR}/aarch64-linux
     71		;;
     72
     73	i686*)	. ${_AUTOCONFCACHEDIR}/endian-little
     74		. ${_AUTOCONFCACHEDIR}/ix86-common
     75		;;
     76
     77	mips)	. ${_AUTOCONFCACHEDIR}/endian-big
     78		. ${_AUTOCONFCACHEDIR}/mips-common
     79		. ${_AUTOCONFCACHEDIR}/mips-linux
     80		;;
     81
     82	mipshf*)
     83		. ${_AUTOCONFCACHEDIR}/endian-big
     84		. ${_AUTOCONFCACHEDIR}/mips-common
     85		. ${_AUTOCONFCACHEDIR}/mips-linux
     86		;;
     87
     88	mipsel*)
     89		. ${_AUTOCONFCACHEDIR}/endian-little
     90		. ${_AUTOCONFCACHEDIR}/mips-common
     91		. ${_AUTOCONFCACHEDIR}/mips-linux
     92		;;
     93
     94	x86_64*)
     95		. ${_AUTOCONFCACHEDIR}/endian-little
     96		. ${_AUTOCONFCACHEDIR}/x86_64-linux
     97		;;
     98
     99	ppc64le*)
    100		. ${_AUTOCONFCACHEDIR}/endian-little
    101		. ${_AUTOCONFCACHEDIR}/powerpc-common
    102		. ${_AUTOCONFCACHEDIR}/powerpc-linux
    103		. ${_AUTOCONFCACHEDIR}/powerpc64-linux
    104		;;
    105
    106	ppc64*)
    107		. ${_AUTOCONFCACHEDIR}/endian-big
    108		. ${_AUTOCONFCACHEDIR}/powerpc-common
    109		. ${_AUTOCONFCACHEDIR}/powerpc-linux
    110		. ${_AUTOCONFCACHEDIR}/powerpc64-linux
    111		;;
    112
    113	ppcle*)
    114		. ${_AUTOCONFCACHEDIR}/endian-little
    115		. ${_AUTOCONFCACHEDIR}/powerpc-common
    116		. ${_AUTOCONFCACHEDIR}/powerpc-linux
    117		. ${_AUTOCONFCACHEDIR}/powerpc32-linux
    118		;;
    119
    120	ppc*)
    121		. ${_AUTOCONFCACHEDIR}/endian-big
    122		. ${_AUTOCONFCACHEDIR}/powerpc-common
    123		. ${_AUTOCONFCACHEDIR}/powerpc-linux
    124		. ${_AUTOCONFCACHEDIR}/powerpc32-linux
    125		;;
    126
    127	*) ;;
    128esac
    129
    130unset _AUTOCONFCACHEDIR
    131
    132set +a # vars are not exported to the environment anymore