summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-12-16 17:09:15 -0500
committerStephen Hemminger <shemminger@vyatta.com>2012-12-17 09:13:46 -0800
commit601f60e5527abba9332806fab2b04f2a82e9459e (patch)
treebfa481ab101c87bb53c2a985af93a066d83d9052 /configure
parentcbe195dc6b151348839f16c7e6d7cdf3d81af485 (diff)
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>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure b/configure
index 99121144..ea1038df 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 <<EOF
@@ -224,6 +229,7 @@ rm -f $TMPDIR/ipsettest.c $TMPDIR/ipsettest
}
echo "# Generated config based on" $INCLUDE >Config
+check_toolchain
echo "TC schedulers"