From bb7a22b5840e56c034227ad596b1165c03f2da27 Mon Sep 17 00:00:00 2001
From: Mans Rullgard <mans@mansr.com>
Date: Sun, 13 Feb 2011 13:06:53 +0000
Subject: [PATCH] configure: add cleanws() function

This function removes leading and trailing spaces and collapses
multiple spaces into one.

Signed-off-by: Mans Rullgard <mans@mansr.com>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index a310d257e44..01b092f37d3 100755
--- a/configure
+++ b/configure
@@ -313,6 +313,10 @@ sh_quote(){
     echo "$v"
 }
 
+cleanws(){
+    echo "$@" | sed 's/^ *//;s/  */ /g;s/ *$//'
+}
+
 filter(){
     pat=$1
     shift
-- 
GitLab