From 33795bc4d39227818f1ea849bee50216235e8a0f Mon Sep 17 00:00:00 2001
From: Graydon Hoare <graydon@mozilla.com>
Date: Thu, 18 Oct 2012 13:04:52 -0700
Subject: [PATCH] configure: fix use of bash-specific here strings (also awk,
 please no more deps).

---
 configure | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index cd500b6ec43..3ff72afe67f 100755
--- a/configure
+++ b/configure
@@ -362,11 +362,15 @@ fi
 
 if [ ! -z "$CFG_PANDOC" ]
 then
-    read PV_MAJOR PV_MINOR <<<$(pandoc --version | awk '/^pandoc/ {split($2, PV, "."); print PV[1] " " PV[2]}')
+	PANDOC_VER_LINE=$(pandoc --version | grep '^pandoc ')
+	PANDOC_VER=${PANDOC_VER_LINE#pandoc }
+	PV_MAJOR_MINOR=${PANDOC_VER%.[0-9]}
+	PV_MAJOR=${PV_MAJOR_MINOR%.[0-9]}
+	PV_MINOR=${PV_MAJOR_MINOR#[0-9].}
     if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
     then
-	step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
-	BAD_PANDOC=1
+		step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
+		BAD_PANDOC=1
     fi
 fi