diff options
author | lurchi <lurchi@strangeplace.net> | 2018-11-14 17:24:43 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2018-11-14 17:24:43 +0100 |
commit | 75c351e315e2e8578ed7eaec4323d66d3db901d8 (patch) | |
tree | 6746bb35a5ba3e4e82b77372911220e5ee252335 | |
parent | da9d61bdbddb37424a465f63f6b4c691b342363e (diff) | |
download | gnunet-75c351e315e2e8578ed7eaec4323d66d3db901d8.tar.gz gnunet-75c351e315e2e8578ed7eaec4323d66d3db901d8.zip |
fix #5477
-rw-r--r-- | configure.ac | 149 |
1 files changed, 75 insertions, 74 deletions
diff --git a/configure.ac b/configure.ac index 3310168e0..1d266225a 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -300,30 +300,88 @@ then | |||
300 | fi | 300 | fi |
301 | AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) | 301 | AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) |
302 | 302 | ||
303 | # should the build process be building the documentation? | ||
304 | AC_MSG_CHECKING(whether to build documentation) | ||
305 | AC_ARG_ENABLE([documentation], | ||
306 | [AS_HELP_STRING([--disable-documentation], [do not build the documentation])], | ||
307 | [documentation=${enableval}], | ||
308 | [documentation=yes]) | ||
309 | AC_MSG_RESULT($documentation) | ||
310 | if test "x$documentation" = "xyes" | ||
311 | then | ||
312 | AM_CONDITIONAL([DOCUMENTATION],true) | ||
313 | AC_DEFINE([DOCUMENTATION],[1],[Building the documentation]) | ||
314 | else | ||
315 | AM_CONDITIONAL([DOCUMENTATION],false) | ||
316 | AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) | ||
317 | fi | ||
318 | |||
319 | # TODO: Include check for mandoc + texi2mdoc. | ||
320 | # TODO: Rename the switch? Just 'section7' is too vague. | ||
321 | # mdoc section 7 output. | ||
322 | AC_MSG_CHECKING(wether to build section 7 mdoc output) | ||
323 | AC_ARG_ENABLE([section7], | ||
324 | [AS_HELP_STRING([--disable-section7], [do not build section 7 mdoc output])], | ||
325 | [section7=${enableval}], | ||
326 | [section7=yes]) | ||
327 | AC_MSG_RESULT($section7) | ||
328 | if test "x$section7" = "xyes" | ||
329 | then | ||
330 | if test "$texi2mdoc" = 0 | ||
331 | then | ||
332 | AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.]) | ||
333 | AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System]) | ||
334 | AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/]) | ||
335 | else | ||
336 | AM_CONDITIONAL([SECTION7],true) | ||
337 | AC_DEFINE([SECTION7],[1],[Building section 7 mdoc output]) | ||
338 | fi | ||
339 | else | ||
340 | AM_CONDITIONAL([SECTION7],false) | ||
341 | AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output]) | ||
342 | fi | ||
343 | |||
344 | # should the build process be building only the documentation? | ||
345 | AC_MSG_CHECKING(whether to build only documentation) | ||
346 | AC_ARG_ENABLE([documentation-only], | ||
347 | [AS_HELP_STRING([--enable-documentation-only], [build only the documentation])], | ||
348 | [documentation_only=${enableval}], | ||
349 | [documentation_only=no]) | ||
350 | AC_MSG_RESULT($documentation_only) | ||
351 | if test "x$documentation_only" = "xyes" | ||
352 | then | ||
353 | AM_CONDITIONAL([DOCUMENTATION_ONLY],true) | ||
354 | AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation]) | ||
355 | else | ||
356 | AM_CONDITIONAL([DOCUMENTATION_ONLY],false) | ||
357 | AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation]) | ||
358 | fi | ||
359 | |||
360 | |||
303 | # Check for makeinfo version >= 5, required for building documentation. | 361 | # Check for makeinfo version >= 5, required for building documentation. |
304 | # TODO: invalid version should imply --disable-documentation (and | ||
305 | # maybe --with-section7). | ||
306 | # TODO: add check for alternatives | 362 | # TODO: add check for alternatives |
307 | # TODO: add switch to skip documentation building | ||
308 | have_makeinfo_5=false | 363 | have_makeinfo_5=false |
309 | AC_PROG_SED | 364 | if test x"$documentation" = xyes || test x"$documentation_only" = xyes |
310 | AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes]) | ||
311 | if test x"${MAKEINFO_FOUND}" = xyes | ||
312 | then | 365 | then |
313 | MAKEINFO_VERSION_REQ=5 | 366 | AC_PROG_SED |
314 | AC_MSG_CHECKING([for makeinfo version >= $MAKEINFO_VERSION_REQ]) | 367 | AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes]) |
315 | # XXX: is this sed invocation portable? | 368 | if test x"${MAKEINFO_FOUND}" = xyes |
316 | MAKEINFO_VERSION=`makeinfo --version | sed -ne 's/^\(makeinfo\|texi2any\) .* \([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*.*$/\2/p'` | ||
317 | if test x$MAKEINFO_VERSION = x -o 0$MAKEINFO_VERSION -lt $MAKEINFO_VERSION_REQ | ||
318 | then | 369 | then |
319 | AC_MSG_RESULT([no]) | 370 | MAKEINFO_VERSION_REQ=5 |
320 | AC_MSG_FAILURE([Program 'makeinfo' version >= $MAKEINFO_VERSION_REQ is required.]) | 371 | AC_MSG_CHECKING([for makeinfo version >= $MAKEINFO_VERSION_REQ]) |
372 | # XXX: is this sed invocation portable? | ||
373 | MAKEINFO_VERSION=`makeinfo --version | sed -ne 's/^\(makeinfo\|texi2any\) .* \([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*.*$/\2/p'` | ||
374 | if test x$MAKEINFO_VERSION = x -o 0$MAKEINFO_VERSION -lt $MAKEINFO_VERSION_REQ | ||
375 | then | ||
376 | AC_MSG_RESULT([no]) | ||
377 | AC_MSG_FAILURE([Program 'makeinfo' version >= $MAKEINFO_VERSION_REQ is required.]) | ||
378 | else | ||
379 | AC_MSG_RESULT([yes]) | ||
380 | have_makeinfo_5=true | ||
381 | fi | ||
321 | else | 382 | else |
322 | AC_MSG_RESULT([yes]) | 383 | 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'.]) |
323 | have_makeinfo_5=true | ||
324 | fi | 384 | fi |
325 | else | ||
326 | 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'.]) | ||
327 | fi | 385 | fi |
328 | AM_CONDITIONAL([HAVE_MAKEINFO_5], [test x$have_makeinfo_5 = xtrue]) | 386 | AM_CONDITIONAL([HAVE_MAKEINFO_5], [test x$have_makeinfo_5 = xtrue]) |
329 | 387 | ||
@@ -693,63 +751,6 @@ AC_CHECK_LIB([kvm],[kvm_open]) | |||
693 | AC_CHECK_LIB([kstat],[kstat_open]) | 751 | AC_CHECK_LIB([kstat],[kstat_open]) |
694 | 752 | ||
695 | 753 | ||
696 | # should the build process be building the documentation? | ||
697 | AC_MSG_CHECKING(whether to build documentation) | ||
698 | AC_ARG_ENABLE([documentation], | ||
699 | [AS_HELP_STRING([--disable-documentation], [do not build the documentation])], | ||
700 | [documentation=${enableval}], | ||
701 | [documentation=yes]) | ||
702 | AC_MSG_RESULT($documentation) | ||
703 | if test "x$documentation" = "xyes" | ||
704 | then | ||
705 | AM_CONDITIONAL([DOCUMENTATION],true) | ||
706 | AC_DEFINE([DOCUMENTATION],[1],[Building the documentation]) | ||
707 | else | ||
708 | AM_CONDITIONAL([DOCUMENTATION],false) | ||
709 | AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) | ||
710 | fi | ||
711 | |||
712 | # TODO: Include check for mandoc + texi2mdoc. | ||
713 | # TODO: Rename the switch? Just 'section7' is too vague. | ||
714 | # mdoc section 7 output. | ||
715 | AC_MSG_CHECKING(wether to build section 7 mdoc output) | ||
716 | AC_ARG_ENABLE([section7], | ||
717 | [AS_HELP_STRING([--disable-section7], [do not build section 7 mdoc output])], | ||
718 | [section7=${enableval}], | ||
719 | [section7=yes]) | ||
720 | AC_MSG_RESULT($section7) | ||
721 | if test "x$section7" = "xyes" | ||
722 | then | ||
723 | if test "$texi2mdoc" = 0 | ||
724 | then | ||
725 | AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.]) | ||
726 | AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System]) | ||
727 | AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/]) | ||
728 | else | ||
729 | AM_CONDITIONAL([SECTION7],true) | ||
730 | AC_DEFINE([SECTION7],[1],[Building section 7 mdoc output]) | ||
731 | fi | ||
732 | else | ||
733 | AM_CONDITIONAL([SECTION7],false) | ||
734 | AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output]) | ||
735 | fi | ||
736 | |||
737 | # should the build process be building only the documentation? | ||
738 | AC_MSG_CHECKING(whether to build only documentation) | ||
739 | AC_ARG_ENABLE([documentation-only], | ||
740 | [AS_HELP_STRING([--enable-documentation-only], [build only the documentation])], | ||
741 | [documentation_only=${enableval}], | ||
742 | [documentation_only=no]) | ||
743 | AC_MSG_RESULT($documentation_only) | ||
744 | if test "x$documentation_only" = "xyes" | ||
745 | then | ||
746 | AM_CONDITIONAL([DOCUMENTATION_ONLY],true) | ||
747 | AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation]) | ||
748 | else | ||
749 | AM_CONDITIONAL([DOCUMENTATION_ONLY],false) | ||
750 | AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation]) | ||
751 | fi | ||
752 | |||
753 | # should the build process be restricted to the code required | 754 | # should the build process be restricted to the code required |
754 | # for GNU Taler wallets? | 755 | # for GNU Taler wallets? |
755 | AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY) | 756 | AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY) |