diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | configure | 34 |
2 files changed, 35 insertions, 1 deletions
@@ -16,7 +16,7 @@ TOOLS ?= netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun mausezahn PREFIX ?= # Disable if you don't want it -CCACHE ?= ccache +CCACHE ?= $(CONFIG_CCACHE) # Location of installation paths. SBINDIR = $(PREFIX)/usr/sbin @@ -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 |