aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-08-02 17:25:41 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2022-08-02 17:25:41 +0200
commit4fe567d9d94b9159254a2f2cce64855a794d9699 (patch)
treeb286f5a454472ec92ff88376b297e411e64c5843 /configure.ac
parente8b7707f833739851227d4865e6c6064865f19ec (diff)
downloadgnunet-4fe567d9d94b9159254a2f2cce64855a794d9699.tar.gz
gnunet-4fe567d9d94b9159254a2f2cce64855a794d9699.zip
DOC: Move from texinfo to sphinx
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac75
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
445AC_CHECK_PROG([SPHINX_BINARY], [sphinx-build], [true], [false])
446AM_CONDITIONAL([HAVE_SPHINX_BINARY], [$SPHINX_BINARY])
447
444AM_CONDITIONAL([DOCUMENTATION], [test "x$documentation" = "xyes"]) 448AM_CONDITIONAL([DOCUMENTATION], [test "x$documentation" = "xyes"])
445AS_IF([test "x$documentation" = "xyes"], 449AS_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
449AC_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])
454AM_CONDITIONAL([TEXI2MDOC_GENERATION], [test "x$texi2mdoc_enabled" = "xyes"])
455AS_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])
463AM_CONDITIONAL([HAVE_TEXI2MDOC], [test "x$TEXI2MDOC_BINARY" != "xfalse"])
464
465AC_CHECK_PROGS([MANDOC_BINARY], [mandoc], [false]) 455AC_CHECK_PROGS([MANDOC_BINARY], [mandoc], [false])
466AM_CONDITIONAL([HAVE_MANDOC], [test "x$MANDOC_BINARY" != "xfalse"]) 456AM_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])
490AM_CONDITIONAL([INCLUDE_MANPAGES], [test "x$include_man" = "x1"]) 480AM_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.
509AC_ARG_ENABLE([texinfo4],
510 [AS_HELP_STRING([--enable-texinfo4],
511 [Use Texinfo version 4 specific switches])],
512 [activate_texinfo4=${enableval}],
513 [activate_texinfo4=no])
514AM_CONDITIONAL([ACTIVATE_TEXINFO4], [test "x$activate_texinfo4" = "xyes"])
515AS_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'"])
522AC_SUBST([TEXINFO_HTMLFLAGS])
523
524# Hardening options 482# Hardening options
525AC_ARG_ENABLE([gcc-hardening], 483AC_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
1331doc/Makefile 1289doc/Makefile
1332doc/man/Makefile 1290doc/man/Makefile
1333doc/doxygen/Makefile 1291doc/doxygen/Makefile
1334doc/handbook/Makefile
1335doc/tutorial/Makefile
1336m4/Makefile 1292m4/Makefile
1337po/Makefile.in 1293po/Makefile.in
1338src/Makefile 1294src/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
1501AS_IF([test "x$texi2mdoc_enabled" = "xyes"],
1502 [mdocml_msg="yes"],
1503 [mdocml_msg="no"])
1504AS_IF([test "x$TEXI2MDOC_BINARY" = "xfalse"],
1505 [mdocbin_msg="no"],
1506 [mdocbin_msg="yes"])
1507
1508# mandoc 1456# mandoc
1509AS_IF([test "x$MANDOC_BINARY" = "xfalse"], 1457AS_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
1514AS_IF([test "x$documentation" = "xyes"], 1462AS_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
1519conversation_msg="no" 1467conversation_msg="no"
@@ -1660,7 +1608,7 @@ gstreamer: ${gstreamer_msg}
1660 1608
1661Java: ${java_msg} 1609Java: ${java_msg}
1662 1610
1663texi2mdoc: ${mdocbin_msg} 1611sphinx: ${sphinx_msg}
1664mandoc: ${mandoc_msg} 1612mandoc: ${mandoc_msg}
1665 1613
1666GNUnet configuration 1614GNUnet configuration
@@ -1671,7 +1619,6 @@ Conversation: ${conversation_msg}
1671Database Backends ${features_msg} 1619Database Backends ${features_msg}
1672Experimental Code: ${experimental_msg} 1620Experimental Code: ${experimental_msg}
1673 1621
1674Texinfo Manual: ${texinfo_msg}
1675Transpiled mdocml Manual: ${mdocml_msg} 1622Transpiled mdocml Manual: ${mdocml_msg}
1676]) 1623])
1677 1624