From fdf97f14ccef9dacf22a2afb28ef53848f032a00 Mon Sep 17 00:00:00 2001
From: Rene Hopf <renehopf@mac.com>
Date: Mon, 5 Jan 2015 02:27:38 +0100
Subject: [PATCH] fix autogen.sh on os x

---
 autogen.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/autogen.sh b/autogen.sh
index faa0235..0565fce 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -22,9 +22,11 @@ OS=`uname`
 
 LIBTOOLIZE=libtoolize
 ACLOCAL_DIR=
+SED=sed
 
 if [ "x$OS" = "xDarwin" ]; then
 	LIBTOOLIZE=glibtoolize
+	SED=gsed
 
 	if [ -d /sw/share/aclocal ]; then
 		# fink installs aclocal macros here
@@ -58,7 +60,7 @@ aclocal ${ACLOCAL_DIR} || exit 1
 # Check the version of a specific autoconf macro that tends to cause problems.
 CXXMACROVERSION=$(
 	grep -B 5 'm4_define(\[_AX_CXX_COMPILE_STDCXX_11_testbody\]' aclocal.m4 |
-	sed -nr 's/.*serial[[:space:]]+([[:digit:]]+).*/\1/p'
+	${SED} -nr 's/.*serial[[:space:]]+([[:digit:]]+).*/\1/p'
 )
 if [ "x$CXXMACROVERSION" = "x" ]; then
 	echo "--- Warning: AX_CXX_COMPILE_STDCXX_11 macro not found."
-- 
1.9.3

