From c87228df5ba668326e344c1e2617ec9d20fac89b Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 18 Jan 2017 15:14:36 +0100 Subject: [PATCH] build: don't try to process docs if doxygen is not installed Signed-off-by: Bartosz Golaszewski --- Makefile.am | 4 ++++ configure.ac | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile.am b/Makefile.am index ad9589e..b56fed6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,6 +9,10 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = include src +if HAS_DOXYGEN + doc: @(cat Doxyfile; echo PROJECT_NUMBER = $(VERSION_STR)) | doxygen - .PHONY: doc + +endif diff --git a/configure.ac b/configure.ac index 853c380..3ee698e 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,13 @@ AC_CHECK_HEADERS([dirent.h], [], [AC_MSG_ERROR([dirent.h header not found])]) AC_CHECK_HEADERS([linux/gpio.h], [], [AC_MSG_ERROR([linux/gpio.h header not found])]) AC_CHECK_HEADERS([sys/signalfd.h], [], [AC_MSG_ERROR([sys/signalfd.h header not found])]) +AC_CHECK_PROG([has_doxygen], [doxygen], [true], [false]) +AM_CONDITIONAL([HAS_DOXYGEN], [test x$has_doxygen = xtrue]) +if test "x$has_doxygen" = xfalse +then + AC_MSG_NOTICE([doxygen not found - documentation cannot be generated]) +fi + AC_CONFIG_FILES([Makefile include/Makefile src/Makefile -- 2.30.2