From 7199a4fe1d6f66722158d73d4403f8dad8637bd1 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 28 Jun 2013 14:28:06 +0200 Subject: configure: Check for presence of pkg-config and ccache binaries Check whether pkg-config and ccache are in the PATH. A missing pkg-config will cause the configure script to abort with an error. The presence of ccache is written to Config and used by the Makefile to conditionally make use of it. Signed-off-by: Tobias Klauser --- configure | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'configure') diff --git a/configure b/configure index ed1eacd..fd8211e 100755 --- a/configure +++ b/configure @@ -1,6 +1,7 @@ #!/bin/bash # This isn't a configure generated by autoconf! +MISSING_PKG_CONFIG=0 MISSING_DEFS=0 MISSING_NACL=0 @@ -9,6 +10,31 @@ MISSING_NACL=0 TMPDIR=$(mktemp -d config.XXXXXX) trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM +check_pkg_config() +{ + echo -n "[*] Checking pkg-config ... " + + if [ "x$(which pkg-config)" == "x" ] ; then + echo "[NO]" + MISSING_PKG_CONFIG=1 + else + echo "[YES]" + fi +} + +check_ccache() +{ + echo -n "[*] Checking ccache ... " + + if [ "x$(which ccache)" == "x" ] ; then + echo "[NO]" + echo "CONFIG_CCACHE=" >> Config + else + echo "[YES]" + echo "CONFIG_CCACHE=ccache" >> Config + fi +} + check_nacl() { echo -n "[*] Checking nacl ... " @@ -172,6 +198,14 @@ EOF } echo "# This file is autogenerated by the configure script" > Config +check_pkg_config + +if [ "$MISSING_PKG_CONFIG" == "1" ] ; then + echo "[!] pkg-config is not installed on your system or not in the PATH" + exit 1 +fi + +check_ccache check_nacl check_libnl check_tpacket -- cgit v1.2.3-54-g00ecf >refslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-02-07 10:07:03 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-07 10:07:03 -0500
commit6a413e269b170d6d3bd32a71de4d5dcf987d6843 (patch)
treec17a5d52ac023e720cf7d57d479e0ac1a0524df3
parent432d4f8ab03527958294ad5e539acaebfc4625e3 (diff)
parent2d6a0e9de03ee658a9adc3bfb2f0ca55dff1e478 (diff)
Merge branch 'net-Fix-on-stack-USB-buffers'
Ben Hutchings says: ==================== net: Fix on-stack USB buffers Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). This series fixes all the instances I could find where USB networking drivers do that. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>