diff options
-rw-r--r-- | configure.ac | 54 | ||||
-rw-r--r-- | doc/handbook/Makefile.am | 2 |
2 files changed, 13 insertions, 43 deletions
diff --git a/configure.ac b/configure.ac index 3355812f6..b847b53d3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -319,29 +319,26 @@ else | |||
319 | AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) | 319 | AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) |
320 | fi | 320 | fi |
321 | 321 | ||
322 | # TODO: Include check for mandoc + texi2mdoc. | 322 | AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation) |
323 | # TODO: Rename the switch? Just 'section7' is too vague. | 323 | AC_ARG_ENABLE([texi2mdoc-generation], |
324 | # mdoc section 7 output. | 324 | [AS_HELP_STRING([--disable-texi2mdoc-generation], [do not include generated texi2mdoc output in installation])], |
325 | AC_MSG_CHECKING(wether to build section 7 mdoc output) | 325 | [texi2mdoc-generation=${enableval}], |
326 | AC_ARG_ENABLE([section7], | 326 | [texi2mdoc-generation=yes]) |
327 | [AS_HELP_STRING([--disable-section7], [do not build section 7 mdoc output])], | 327 | AC_MSG_RESULT($texi2mdoc-generation) |
328 | [section7=${enableval}], | 328 | if test "x$texi2mdoc-generation" = "xyes" |
329 | [section7=yes]) | ||
330 | AC_MSG_RESULT($section7) | ||
331 | if test "x$section7" = "xyes" | ||
332 | then | 329 | then |
333 | if test "$texi2mdoc" = 0 | 330 | if test "$texi2mdoc-generation" = 0 |
334 | then | 331 | then |
335 | AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.]) | 332 | AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.]) |
336 | AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System]) | 333 | AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System]) |
337 | AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/]) | 334 | AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/]) |
338 | else | 335 | else |
339 | AM_CONDITIONAL([SECTION7],true) | 336 | AM_CONDITIONAL([TEXI2MDOC_GENERATION],true) |
340 | AC_DEFINE([SECTION7],[1],[Building section 7 mdoc output]) | 337 | AC_DEFINE([TEXI2MDOC_GENERATION],[1],[Building section 7 mdoc output]) |
341 | fi | 338 | fi |
342 | else | 339 | else |
343 | AM_CONDITIONAL([SECTION7],false) | 340 | AM_CONDITIONAL([TEXI2MDOC_GENERATION],false) |
344 | AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output]) | 341 | AC_DEFINE([TEXI2MDOC_GENERATION],[0],[Not building section 7 mdoc output]) |
345 | fi | 342 | fi |
346 | 343 | ||
347 | # should the build process be building only the documentation? | 344 | # should the build process be building only the documentation? |
@@ -361,33 +358,6 @@ else | |||
361 | fi | 358 | fi |
362 | 359 | ||
363 | 360 | ||
364 | # Check for makeinfo version >= 5, required for building documentation. | ||
365 | # TODO: add check for alternatives | ||
366 | have_makeinfo_5=false | ||
367 | if test x"$documentation" = xyes || test x"$documentation_only" = xyes | ||
368 | then | ||
369 | AC_PROG_SED | ||
370 | AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes]) | ||
371 | if test x"${MAKEINFO_FOUND}" = xyes | ||
372 | then | ||
373 | MAKEINFO_VERSION_REQ=5 | ||
374 | AC_MSG_CHECKING([for makeinfo version >= $MAKEINFO_VERSION_REQ]) | ||
375 | # XXX: is this sed invocation portable? | ||
376 | MAKEINFO_VERSION=`makeinfo --version | sed -ne 's/^\(makeinfo\|texi2any\) .* \([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*.*$/\2/p'` | ||
377 | if test x$MAKEINFO_VERSION = x -o 0$MAKEINFO_VERSION -lt $MAKEINFO_VERSION_REQ | ||
378 | then | ||
379 | AC_MSG_RESULT([no]) | ||
380 | AC_MSG_FAILURE([Program 'makeinfo' version >= $MAKEINFO_VERSION_REQ is required.]) | ||
381 | else | ||
382 | AC_MSG_RESULT([yes]) | ||
383 | have_makeinfo_5=true | ||
384 | fi | ||
385 | else | ||
386 | AC_MSG_FAILURE([Missing program 'makeinfo', Documentation will not be built. Please install it if you want 'info' documentation or refer to online resources at 'https://docs.gnunet.org'.]) | ||
387 | fi | ||
388 | fi | ||
389 | AM_CONDITIONAL([HAVE_MAKEINFO_5], [test x$have_makeinfo_5 = xtrue]) | ||
390 | |||
391 | # Adam shostack suggests the following for Windows: | 361 | # Adam shostack suggests the following for Windows: |
392 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all | 362 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all |
393 | AC_ARG_ENABLE(gcc-hardening, | 363 | AC_ARG_ENABLE(gcc-hardening, |
diff --git a/doc/handbook/Makefile.am b/doc/handbook/Makefile.am index d12ad1af8..8be033f23 100644 --- a/doc/handbook/Makefile.am +++ b/doc/handbook/Makefile.am | |||
@@ -138,7 +138,7 @@ version.texi/replacement/revert: | |||
138 | @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi | 138 | @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi |
139 | @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi | 139 | @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi |
140 | 140 | ||
141 | if SECTION7 | 141 | if TEXI2MDOC_GENERATION |
142 | gnunet-documentation.7: version.texi/replacement | 142 | gnunet-documentation.7: version.texi/replacement |
143 | @echo Attempting to output an mdoc formatted section 7 document | 143 | @echo Attempting to output an mdoc formatted section 7 document |
144 | @texi2mdoc -I$(pwd):$(pwd)/chapters gnunet.texi > ../man/gnunet-documentation.7 | 144 | @texi2mdoc -I$(pwd):$(pwd)/chapters gnunet.texi > ../man/gnunet-documentation.7 |