diff options
author | Samuel Iglesias Gonsalvez <siglesias@igalia.com> | 2015-01-13 11:02:27 +0100 |
---|---|---|
committer | Iago Toral Quiroga <itoral@igalia.com> | 2015-01-14 12:52:22 +0100 |
commit | efef6c828092702b1f928f98d15fb90b4544a85c (patch) | |
tree | b3b1c4eb8a652844af1efac64b04ae190671abe3 /configure.ac | |
parent | 6d43a4c33864ae66a92b1d893f4400b7fa7f8a41 (diff) | |
download | mesa-efef6c828092702b1f928f98d15fb90b4544a85c.tar.gz |
configure: add check for GNU indent
Only GNU indent is supported when indenting autogenerated 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.
Fallback to 'cat' if a non-GNU indent is found.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88335
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 3c614ea5c4d..c72fe9272b0 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.3.4) |