aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-02-09 14:20:00 +0000
committerng0 <ng0@n0.is>2019-02-09 14:22:54 +0000
commitcf3fe60e3977d7631996089377a494e25d191726 (patch)
treebb7b9a31a5938aa8a3dcffa51e6b748981ee21b0
parente4cfaf779ee43f32e7c9d3f3190279e02aa05702 (diff)
downloadgnunet-cf3fe60e3977d7631996089377a494e25d191726.tar.gz
gnunet-cf3fe60e3977d7631996089377a494e25d191726.zip
configure: don't check for makeinfo version. rename section7 to texi2mdoc-generation
Signed-off-by: ng0 <ng0@n0.is>
-rw-r--r--configure.ac54
-rw-r--r--doc/handbook/Makefile.am2
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])
320fi 320fi
321 321
322# TODO: Include check for mandoc + texi2mdoc. 322AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation)
323# TODO: Rename the switch? Just 'section7' is too vague. 323AC_ARG_ENABLE([texi2mdoc-generation],
324# mdoc section 7 output. 324[AS_HELP_STRING([--disable-texi2mdoc-generation], [do not include generated texi2mdoc output in installation])],
325AC_MSG_CHECKING(wether to build section 7 mdoc output) 325[texi2mdoc-generation=${enableval}],
326AC_ARG_ENABLE([section7], 326[texi2mdoc-generation=yes])
327[AS_HELP_STRING([--disable-section7], [do not build section 7 mdoc output])], 327AC_MSG_RESULT($texi2mdoc-generation)
328[section7=${enableval}], 328if test "x$texi2mdoc-generation" = "xyes"
329[section7=yes])
330AC_MSG_RESULT($section7)
331if test "x$section7" = "xyes"
332then 329then
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
342else 339else
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])
345fi 342fi
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
361fi 358fi
362 359
363 360
364# Check for makeinfo version >= 5, required for building documentation.
365# TODO: add check for alternatives
366have_makeinfo_5=false
367if test x"$documentation" = xyes || test x"$documentation_only" = xyes
368then
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
388fi
389AM_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
393AC_ARG_ENABLE(gcc-hardening, 363AC_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
141if SECTION7 141if TEXI2MDOC_GENERATION
142gnunet-documentation.7: version.texi/replacement 142gnunet-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