From: Mike Frysinger Date: Sun, 16 Dec 2012 22:09:15 +0000 (-0500) Subject: configure: move toolchain init to a function X-Git-Tag: v3.8.0~3^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=601f60e5527abba9332806fab2b04f2a82e9459e;p=thirdparty%2Fiproute2.git 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 --- diff --git a/configure b/configure index 991211443..ea1038df5 100755 --- a/configure +++ b/configure @@ -2,14 +2,19 @@ # This is not an autconf generated configure # INCLUDE=${1:-"$PWD/include"} -: ${PKG_CONFIG:=pkg-config} -: ${CC=gcc} -echo "PKG_CONFIG:=${PKG_CONFIG}" >>Config # Make a temp directory in build tree. TMPDIR=$(mktemp -d config.XXXXXX) 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() { cat >$TMPDIR/atmtest.c <Config +check_toolchain echo "TC schedulers"