configure: move toolchain init to a function
The layout of this file uses functions to update Config. Move the toolchain logic to the same style to fix setting the vars in Config. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
cbe195dc6b
commit
601f60e552
|
|
@ -2,14 +2,19 @@
|
||||||
# This is not an autconf generated configure
|
# This is not an autconf generated configure
|
||||||
#
|
#
|
||||||
INCLUDE=${1:-"$PWD/include"}
|
INCLUDE=${1:-"$PWD/include"}
|
||||||
: ${PKG_CONFIG:=pkg-config}
|
|
||||||
: ${CC=gcc}
|
|
||||||
echo "PKG_CONFIG:=${PKG_CONFIG}" >>Config
|
|
||||||
|
|
||||||
# Make a temp directory in build tree.
|
# Make a temp directory in build tree.
|
||||||
TMPDIR=$(mktemp -d config.XXXXXX)
|
TMPDIR=$(mktemp -d config.XXXXXX)
|
||||||
trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM
|
trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM
|
||||||
|
|
||||||
|
check_toolchain()
|
||||||
|
{
|
||||||
|
: ${PKG_CONFIG:=pkg-config}
|
||||||
|
: ${CC=gcc}
|
||||||
|
echo "CC:=${CC}" >>Config
|
||||||
|
echo "PKG_CONFIG:=${PKG_CONFIG}" >>Config
|
||||||
|
}
|
||||||
|
|
||||||
check_atm()
|
check_atm()
|
||||||
{
|
{
|
||||||
cat >$TMPDIR/atmtest.c <<EOF
|
cat >$TMPDIR/atmtest.c <<EOF
|
||||||
|
|
@ -224,6 +229,7 @@ rm -f $TMPDIR/ipsettest.c $TMPDIR/ipsettest
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "# Generated config based on" $INCLUDE >Config
|
echo "# Generated config based on" $INCLUDE >Config
|
||||||
|
check_toolchain
|
||||||
|
|
||||||
echo "TC schedulers"
|
echo "TC schedulers"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue