If texi2mdoc is not found, throw a warning when --enable-section7 is true
authorNils Gillmann <ng0@n0.is>
Sun, 21 Oct 2018 14:33:57 +0000 (14:33 +0000)
committerNils Gillmann <ng0@n0.is>
Sun, 21 Oct 2018 14:33:57 +0000 (14:33 +0000)
Signed-off-by: Nils Gillmann <ng0@n0.is>
configure.ac

index 25ff26aa046ba4df0ee953797c9b516d742becce..e9e540419aa71206974bd93c041356512498698b 100644 (file)
@@ -699,8 +699,15 @@ AC_ARG_ENABLE([section7],
 AC_MSG_RESULT($section7)
 if test "x$section7" = "xyes"
 then
+  if test "$texi2mdoc" = 0
+  then
+  AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.])
+  AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System])
+  AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/])
+  else
   AM_CONDITIONAL([SECTION7],true)
   AC_DEFINE([SECTION7],[1],[Building section 7 mdoc output])
+  fi
 else
   AM_CONDITIONAL([SECTION7],false)
   AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output])