build: make makeinfo optional
authorSpencer Oliver <spen@spen-soft.co.uk>
Tue, 30 Sep 2014 10:22:40 +0000 (11:22 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 16 Oct 2014 12:30:26 +0000 (12:30 +0000)
This means the user does not have to install texinfo to build OpenOCD.

Change-Id: Id9f42da798d3c2b79e95214c9e2559cf32802251
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2325
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
configure.ac

index 6b61b1b25e800a593b93c820b046e2e3a12ff79e..ce28633812d909fdcc0a2e27223a938d6a5f6b73 100644 (file)
@@ -5,6 +5,14 @@ AC_CONFIG_SRCDIR([src/openocd.c])
 
 m4_include([config_subdir.m4])dnl
 
+# check for makeinfo before calling AM_INIT_AUTOMAKE
+AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
+if test "x$MAKEINFO" = "x"; then
+  MAKEINFO='echo makeinfo missing; true'
+  AC_MSG_WARN([Info documentation will not be built.])
+fi
+AC_SUBST([MAKEINFO])
+
 AM_INIT_AUTOMAKE([-Wall -Wno-portability dist-bzip2 dist-zip subdir-objects])
 
 AC_CONFIG_HEADERS([config.h])