summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2017-01-01 12:37:37 +0800
committerWill Estes <westes575@gmail.com>2017-01-12 18:01:57 -0500
commit8db5267af4dfe10b0059c16d2b728bfb43146f63 (patch)
tree4563549baa2d9322e99a9229ad1cf40cb58a6891 /configure.ac
parentde0c5e91df965b014b0c0a6f27cafd30a65a7065 (diff)
build: Simplify indent program detection
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 7 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 901339f..b22746d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,19 +102,13 @@ AC_CACHE_CHECK([for m4 that supports -P], [ac_cv_path_M4],
AC_SUBST([M4], [$ac_cv_path_M4])
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the m4 executable name.])
-AC_PATH_PROG(INDENT, indent, indent)
-# if INDENT is set to 'indent' then we didn't find indent
-if test "$INDENT" != indent ; then
- AC_MSG_CHECKING(if $INDENT is GNU indent)
- if $INDENT --version 2>/dev/null | head -n 1|grep "GNU indent" > /dev/null ; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_WARN($INDENT does not appear to be GNU indent.)
- fi
-else
- AC_MSG_WARN(no indent program found: make indent target will not function)
-fi
+AC_PATH_PROG([INDENT], indent, [\${top_srcdir}/build-aux/missing indent])
+ AC_MSG_CHECKING(if $INDENT is GNU indent)
+ AS_IF([$INDENT --version 2>/dev/null | head -n 1 | grep "GNU indent" >/dev/null],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ AC_MSG_WARN($INDENT does not appear to be GNU indent; 'make indent' may not function properly)
+ ])
# checks for headers