From: Bartosz Golaszewski Date: Wed, 18 Jan 2017 14:14:36 +0000 (+0100) Subject: build: don't try to process docs if doxygen is not installed X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c87228df5ba668326e344c1e2617ec9d20fac89b;p=qemu-gpiodev%2Flibgpiod.git build: don't try to process docs if doxygen is not installed Signed-off-by: Bartosz Golaszewski --- 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