Browse Source

Adding --enable-texinfo4 configure switch. Refer to
https://bugs.gnunet.org/view.php?id=3914 and the
Changelog for more.

ng0 4 years ago
parent
commit
68064fbe8d
4 changed files with 47 additions and 2 deletions
  1. 6 0
      ChangeLog
  2. 21 0
      configure.ac
  3. 6 1
      doc/handbook/Makefile.am
  4. 14 1
      doc/tutorial/Makefile.am

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Sun Jul 28 00:00:00 2019 +0000
+  Adding --enable-texinfo4 configure switch, defaulting to off.
+  This allows distributors to override the texinfo 5.x and later
+  commandline options we use, and allows us on the serverside to
+  build html with newer output options. -ng0
+
 Wed 24 Jul 2019 05:43:43 PM CEST
   Releasing GNUnet 0.11.6. -CG
 

+ 21 - 0
configure.ac

@@ -455,6 +455,27 @@ AS_IF([test "x$include_manpages" = "xyes"],
   AC_DEFINE([INCLUDE_MANPAGES],[0],[Not including the man pages in the build and installation])
  ])
 
+# Do we have texinfo4? If yes, it is used to set texinfo4 specific switches
+# (not syntax!) to the commandline tools which generate the html. If not,
+# texinfo5 switches are used. This comes with no version checks, is
+# enabled only at distributors action (ie defaults to "no").
+# Mantis #3914 for more details (https://bugs.gnunet.org/view.php?id=3914)
+AC_MSG_CHECKING(whether to enable texinfo4 switches)
+AC_ARG_ENABLE([texinfo4],
+   [AS_HELP_STRING([--enable-texinfo4], [Use texinfo version 4 specific switches])],
+   [activate_texinfo4=${enableval}],
+   [activate_texinfo4=no])
+AC_MSG_RESULT($activate_texinfo4)
+AS_IF([test "x$activate_texinfo4" = "xyes"],
+ [
+  AM_CONDITIONAL([ACTIVATE_TEXINFO4],true)
+  AC_DEFINE([ACTIVATE_TEXINFO4],[1],[Using texinfo version 4 specific switches])
+ ],[
+  AM_CONDITIONAL([ACTIVATE_TEXINFO4],false)
+  AC_DEFINE([INCLUDE_MANPAGES],[0],[Using texinfo version 5 or later switches])
+ ])
+
+
 # Adam shostack suggests the following for Windows:
 # -D_FORTIFY_SOURCE=2 -fstack-protector-all
 AC_ARG_ENABLE(gcc-hardening,

+ 6 - 1
doc/handbook/Makefile.am

@@ -9,6 +9,7 @@ infoimagedir = $(infodir)/images
 #	$(DOT_FILES:%.dot=%.eps)						\
 #	$(DOT_FILES:%.dot=%.pdf)
 
+if ACTIVATE_TEXINFO4
 # NOTE: While GNU makeinfo 6.5 supports --css-ref=URL,
 # makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
 # base) does only support --css-include=FILE.
@@ -17,8 +18,12 @@ infoimagedir = $(infodir)/images
 # We prefer not to break builds in this case, so
 # we use the include version which is backwards compatible
 # and upwards compatible, while the ref variant is neither.
-
 AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css
+else
+# In the 5.x version they added `--split=chapters|sections` in
+# addition to `--split=nodes`.
+AM_MAKEINFOHTMLFLAGS = --split=sections --css-ref=style.css --css-ref=manual.css
+endif
 
 dist_infoimage_DATA =                           		\
 	images/gnunet-gtk-0-10-gns-a-done.png 			\

+ 14 - 1
doc/tutorial/Makefile.am

@@ -7,8 +7,21 @@ docdir = $(datadir)/doc/gnunet/
 #	$(DOT_FILES:%.dot=%.eps)				\
 #	$(DOT_FILES:%.dot=%.pdf)
 
-# See ../handbook/Makefile.am comment!
+if ACTIVATE_TEXINFO4
+# NOTE: While GNU makeinfo 6.5 supports --css-ref=URL,
+# makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
+# base) does only support --css-include=FILE.
+# The only difference is a shorter html output and
+# in 6.5 the ability to use refs instead of include.
+# We prefer not to break builds in this case, so
+# we use the include version which is backwards compatible
+# and upwards compatible, while the ref variant is neither.
 AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css
+else
+# In the 5.x version they added `--split=chapters|sections` in
+# addition to `--split=nodes`.
+AM_MAKEINFOHTMLFLAGS = --split=sections --css-ref=style.css --css-ref=manual.css
+endif
 
 #DOT_OPTIONS =							\
 #	-Gratio=.9 -Gnodesep=.005 -Granksep=.00005		\