Skip to contentSkip to conversation

configure: add --with/without-doxygen switch

PATCH New Florian Westphal 1 participant 1 message Jun 6, 2020 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 configure: add --with/without-doxygen switch

Allows to turn off doxygen even if its installed, via --without-doxygen.

Default is to probe for doxygen presence (--with-doxygen).

---
 configure.ac | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
configure.ac +10 -5
index 95ee82ab39b7..8960fd8046a7 100644
@@ -36,12 +36,17 @@ AC_CONFIG_FILES([Makefile src/Makefile utils/Makefile examples/Makefile
 	doxygen/Makefile
 	include/linux/Makefile include/linux/netfilter/Makefile])
 
-dnl Only run doxygen Makefile if doxygen installed
+AC_ARG_WITH([doxygen], [AS_HELP_STRING([--with-doxygen],
+            [create doxygen documentation])],
+	    [with_doxygen="$withval"], [with_doxygen=yes])
 
-AC_CHECK_PROGS([DOXYGEN], [doxygen])
-if test -z "$DOXYGEN";
-	then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
-fi
+AS_IF([test "x$with_doxygen" != xno], [
+       AC_CHECK_PROGS([DOXYGEN], [doxygen])
+])
 
 AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+if test -z "$DOXYGEN"; then
+	dnl Only run doxygen Makefile if doxygen installed
+	AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
+fi
 AC_OUTPUT
Signature · 1 line
2.26.2