From 672282fe317ad9166826cd5378eb8a70ba471164 Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsalvez Date: Tue, 13 Jan 2015 11:02:27 +0100 Subject: [PATCH] configure: add check for GNU indent Only GNU indent is supported when indenting format_pack.c and format_unpack.c files. Some non-GNU indent (Mac OS X and FreeBSD) add extra whitespaces than break the build of those files. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88335 Signed-off-by: Samuel Iglesias Gonsalvez --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d4cf4b8..dd00b2c 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,13 @@ AX_PROG_FLEX([], AC_CHECK_PROG(INDENT, indent, indent, cat) if test "x$INDENT" != "xcat"; then - AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -TGLubyte -TGLbyte -TBool') + # Only GNU indent is supported + INDENT_VERSION=`indent --version | grep GNU` + if test $? -eq 0; then + AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -TGLubyte -TGLbyte -TBool') + else + INDENT="cat" + fi fi AX_CHECK_PYTHON_MAKO_MODULE(0.7.3) -- 2.1.0