From 138f28aaafc3bd3087efbc25f49f752c66d14157 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Fri, 12 Jul 2013 10:52:07 +0200 Subject: [PATCH] configure: do not use bash's expr match It looks like there are some incompatibilities in bash's expr match among different versions. Using set -x, gives us on bash 4.2.45: + TOOLS=' netsniff-ng trafgen ifpps bpfc' + for tool in '$_tools' + case "$tool" in ++ expr match '"curvetun' 'astraceroute"' '$1' expr: syntax error + m= + '[' '' == 0 ']' So rather avoid using "expr match" and switch to "case" for substring matching, which should be more portable. Signed-off-by: Daniel Borkmann --- configure | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 64a7fc9c..8ef4ac14 100755 --- a/configure +++ b/configure @@ -25,15 +25,15 @@ trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM tools_remove() { local _tools=$TOOLS + local _todel=$1 TOOLS="" for tool in $_tools ; do case "$tool" in - $1) - m=`expr match \"$TOOLS_NOBUILD\" '$1'` - if [ "$m" == "0" ] ; then - TOOLS_NOBUILD="$TOOLS_NOBUILD $tool" - fi - ;; + $_todel) + case $_todel in + $TOOLS_NOBUILD) ;; + *) TOOLS_NOBUILD="$TOOLS_NOBUILD $tool" ;; + esac ;; *) TOOLS="$TOOLS $tool" ;; esac done -- 2.11.4.GIT