diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-08-02 17:25:41 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-08-02 17:25:41 +0200 |
commit | 4fe567d9d94b9159254a2f2cce64855a794d9699 (patch) | |
tree | b286f5a454472ec92ff88376b297e411e64c5843 /configure.ac | |
parent | e8b7707f833739851227d4865e6c6064865f19ec (diff) | |
download | gnunet-4fe567d9d94b9159254a2f2cce64855a794d9699.tar.gz gnunet-4fe567d9d94b9159254a2f2cce64855a794d9699.zip |
DOC: Move from texinfo to sphinx
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 75 |
1 files changed, 11 insertions, 64 deletions
diff --git a/configure.ac b/configure.ac index 20258d622..60ff7e4b9 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -441,27 +441,17 @@ AC_ARG_ENABLE([documentation], | |||
441 | [do not build the documentation])], | 441 | [do not build the documentation])], |
442 | [documentation=${enableval}], | 442 | [documentation=${enableval}], |
443 | [documentation=yes]) | 443 | [documentation=yes]) |
444 | |||
445 | AC_CHECK_PROG([SPHINX_BINARY], [sphinx-build], [true], [false]) | ||
446 | AM_CONDITIONAL([HAVE_SPHINX_BINARY], [$SPHINX_BINARY]) | ||
447 | |||
444 | AM_CONDITIONAL([DOCUMENTATION], [test "x$documentation" = "xyes"]) | 448 | AM_CONDITIONAL([DOCUMENTATION], [test "x$documentation" = "xyes"]) |
445 | AS_IF([test "x$documentation" = "xyes"], | 449 | AS_IF([test "x$documentation" = "xyes"], |
446 | [AC_DEFINE([DOCUMENTATION], [1], [Define to 1 if documentation is built])], | 450 | [AS_IF([$SPHINX_BINARY], |
451 | [AC_DEFINE([DOCUMENTATION], [1], [Define to 1 if documentation is built])], | ||
452 | [AC_MSG_ERROR([Documentation requires sphinx])])], | ||
447 | [AC_DEFINE([DOCUMENTATION], [0], [Define to 1 if documentation is built])]) | 453 | [AC_DEFINE([DOCUMENTATION], [0], [Define to 1 if documentation is built])]) |
448 | 454 | ||
449 | AC_ARG_ENABLE([texi2mdoc-generation], | ||
450 | [AS_HELP_STRING([--enable-texi2mdoc-generation], | ||
451 | [generate and install texi2mdoc output])], | ||
452 | [texi2mdoc_enabled=${enableval}], | ||
453 | [texi2mdoc_enabled=no]) | ||
454 | AM_CONDITIONAL([TEXI2MDOC_GENERATION], [test "x$texi2mdoc_enabled" = "xyes"]) | ||
455 | AS_IF([test "x$texi2mdoc_enabled" = "xyes"], | ||
456 | [AC_CHECK_PROGS([TEXI2MDOC_BINARY], [texi2mdoc], [false]) | ||
457 | AS_IF([test "x$TEXI2MDOC_BINARY" != "xfalse"], | ||
458 | [AC_DEFINE([TEXI2MDOC_GENERATION], [1], | ||
459 | [Define to 1 if mdoc output is generated])], | ||
460 | [AC_DEFINE([TEXI2MDOC_GENERATION], [0], | ||
461 | [Define to 1 if mdoc output is generated])])], | ||
462 | [TEXI2MDOC_BINARY=false]) | ||
463 | AM_CONDITIONAL([HAVE_TEXI2MDOC], [test "x$TEXI2MDOC_BINARY" != "xfalse"]) | ||
464 | |||
465 | AC_CHECK_PROGS([MANDOC_BINARY], [mandoc], [false]) | 455 | AC_CHECK_PROGS([MANDOC_BINARY], [mandoc], [false]) |
466 | AM_CONDITIONAL([HAVE_MANDOC], [test "x$MANDOC_BINARY" != "xfalse"]) | 456 | AM_CONDITIONAL([HAVE_MANDOC], [test "x$MANDOC_BINARY" != "xfalse"]) |
467 | 457 | ||
@@ -489,38 +479,6 @@ AC_DEFINE_UNQUOTED([INCLUDE_MANPAGES], [$include_man], | |||
489 | [Define to 1 if man pages are included]) | 479 | [Define to 1 if man pages are included]) |
490 | AM_CONDITIONAL([INCLUDE_MANPAGES], [test "x$include_man" = "x1"]) | 480 | AM_CONDITIONAL([INCLUDE_MANPAGES], [test "x$include_man" = "x1"]) |
491 | 481 | ||
492 | # Do we have texinfo4? If yes, it is used to set texinfo4 specific switches | ||
493 | # (not syntax!) to the commandline tools which generate the html. If not, | ||
494 | # texinfo5 switches are used. This comes with no version checks, is | ||
495 | # enabled only at distributors action (ie defaults to "no"). | ||
496 | # Mantis #3914 for more details (https://bugs.gnunet.org/view.php?id=3914) | ||
497 | # While GNU makeinfo 6.5 supports --css-ref=URL, | ||
498 | # makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other | ||
499 | # base) does only support --css-include=FILE. | ||
500 | # The only difference is a shorter html output and | ||
501 | # in 6.5 the ability to use refs instead of include. | ||
502 | # We prefer not to break builds in this case, so | ||
503 | # we use the include version which is backwards compatible | ||
504 | # and upwards compatible, while the ref variant is neither. | ||
505 | # In the 5.x version they added `--split=chapters|sections` in | ||
506 | # addition to `--split=nodes`. | ||
507 | # Hold on to your hats: In version 6.5 this is already removed, ffs. | ||
508 | # GNU Texinfo, please be more consistent than 1 version in switches. | ||
509 | AC_ARG_ENABLE([texinfo4], | ||
510 | [AS_HELP_STRING([--enable-texinfo4], | ||
511 | [Use Texinfo version 4 specific switches])], | ||
512 | [activate_texinfo4=${enableval}], | ||
513 | [activate_texinfo4=no]) | ||
514 | AM_CONDITIONAL([ACTIVATE_TEXINFO4], [test "x$activate_texinfo4" = "xyes"]) | ||
515 | AS_IF([test "x$activate_texinfo4" = "xyes"], | ||
516 | [AC_DEFINE([ACTIVATE_TEXINFO4], [1], | ||
517 | [Define to 1 if using Texinfo v4 switches]) | ||
518 | TEXINFO_HTMLFLAGS="--no-split --css-include=style.css --css-include=manual.css"], | ||
519 | [AC_DEFINE([ACTIVATE_TEXINFO4], [0], | ||
520 | [Define to 1 if using Texinfo v4 switches]) | ||
521 | TEXINFO_HTMLFLAGS="--no-split --css-ref='../style.css' --css-ref='../manual.css'"]) | ||
522 | AC_SUBST([TEXINFO_HTMLFLAGS]) | ||
523 | |||
524 | # Hardening options | 482 | # Hardening options |
525 | AC_ARG_ENABLE([gcc-hardening], | 483 | AC_ARG_ENABLE([gcc-hardening], |
526 | [AS_HELP_STRING([--enable-gcc-hardening], [enable compiler security checks])], | 484 | [AS_HELP_STRING([--enable-gcc-hardening], [enable compiler security checks])], |
@@ -1331,8 +1289,6 @@ contrib/scripts/gnunet-logread/Makefile | |||
1331 | doc/Makefile | 1289 | doc/Makefile |
1332 | doc/man/Makefile | 1290 | doc/man/Makefile |
1333 | doc/doxygen/Makefile | 1291 | doc/doxygen/Makefile |
1334 | doc/handbook/Makefile | ||
1335 | doc/tutorial/Makefile | ||
1336 | m4/Makefile | 1292 | m4/Makefile |
1337 | po/Makefile.in | 1293 | po/Makefile.in |
1338 | src/Makefile | 1294 | src/Makefile |
@@ -1497,23 +1453,15 @@ AS_IF([test "x$libidn_version" = "x2"], | |||
1497 | [libidn_msg="libidn2"], | 1453 | [libidn_msg="libidn2"], |
1498 | [libidn_msg="libidn"]) | 1454 | [libidn_msg="libidn"]) |
1499 | 1455 | ||
1500 | # texi2mdoc | ||
1501 | AS_IF([test "x$texi2mdoc_enabled" = "xyes"], | ||
1502 | [mdocml_msg="yes"], | ||
1503 | [mdocml_msg="no"]) | ||
1504 | AS_IF([test "x$TEXI2MDOC_BINARY" = "xfalse"], | ||
1505 | [mdocbin_msg="no"], | ||
1506 | [mdocbin_msg="yes"]) | ||
1507 | |||
1508 | # mandoc | 1456 | # mandoc |
1509 | AS_IF([test "x$MANDOC_BINARY" = "xfalse"], | 1457 | AS_IF([test "x$MANDOC_BINARY" = "xfalse"], |
1510 | [mandoc_msg="no"], | 1458 | [mandoc_msg="no"], |
1511 | [mandoc_msg="yes"]) | 1459 | [mandoc_msg="yes"]) |
1512 | 1460 | ||
1513 | # texinfo | 1461 | # sphinx |
1514 | AS_IF([test "x$documentation" = "xyes"], | 1462 | AS_IF([test "x$documentation" = "xyes"], |
1515 | [texinfo_msg="yes"], | 1463 | [sphinx_msg="yes"], |
1516 | [texinfo_msg="no"]) | 1464 | [sphinx_msg="no"]) |
1517 | 1465 | ||
1518 | # conversation | 1466 | # conversation |
1519 | conversation_msg="no" | 1467 | conversation_msg="no" |
@@ -1660,7 +1608,7 @@ gstreamer: ${gstreamer_msg} | |||
1660 | 1608 | ||
1661 | Java: ${java_msg} | 1609 | Java: ${java_msg} |
1662 | 1610 | ||
1663 | texi2mdoc: ${mdocbin_msg} | 1611 | sphinx: ${sphinx_msg} |
1664 | mandoc: ${mandoc_msg} | 1612 | mandoc: ${mandoc_msg} |
1665 | 1613 | ||
1666 | GNUnet configuration | 1614 | GNUnet configuration |
@@ -1671,7 +1619,6 @@ Conversation: ${conversation_msg} | |||
1671 | Database Backends ${features_msg} | 1619 | Database Backends ${features_msg} |
1672 | Experimental Code: ${experimental_msg} | 1620 | Experimental Code: ${experimental_msg} |
1673 | 1621 | ||
1674 | Texinfo Manual: ${texinfo_msg} | ||
1675 | Transpiled mdocml Manual: ${mdocml_msg} | 1622 | Transpiled mdocml Manual: ${mdocml_msg} |
1676 | ]) | 1623 | ]) |
1677 | 1624 | ||