aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlurchi <lurchi@strangeplace.net>2018-11-14 17:24:43 +0100
committerlurchi <lurchi@strangeplace.net>2018-11-14 17:24:43 +0100
commit75c351e315e2e8578ed7eaec4323d66d3db901d8 (patch)
tree6746bb35a5ba3e4e82b77372911220e5ee252335
parentda9d61bdbddb37424a465f63f6b4c691b342363e (diff)
downloadgnunet-75c351e315e2e8578ed7eaec4323d66d3db901d8.tar.gz
gnunet-75c351e315e2e8578ed7eaec4323d66d3db901d8.zip
fix #5477
-rw-r--r--configure.ac149
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
300fi 300fi
301AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) 301AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version])
302 302
303# should the build process be building the documentation?
304AC_MSG_CHECKING(whether to build documentation)
305AC_ARG_ENABLE([documentation],
306 [AS_HELP_STRING([--disable-documentation], [do not build the documentation])],
307 [documentation=${enableval}],
308 [documentation=yes])
309AC_MSG_RESULT($documentation)
310if test "x$documentation" = "xyes"
311then
312 AM_CONDITIONAL([DOCUMENTATION],true)
313 AC_DEFINE([DOCUMENTATION],[1],[Building the documentation])
314else
315 AM_CONDITIONAL([DOCUMENTATION],false)
316 AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation])
317fi
318
319# TODO: Include check for mandoc + texi2mdoc.
320# TODO: Rename the switch? Just 'section7' is too vague.
321# mdoc section 7 output.
322AC_MSG_CHECKING(wether to build section 7 mdoc output)
323AC_ARG_ENABLE([section7],
324[AS_HELP_STRING([--disable-section7], [do not build section 7 mdoc output])],
325[section7=${enableval}],
326[section7=yes])
327AC_MSG_RESULT($section7)
328if test "x$section7" = "xyes"
329then
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
339else
340 AM_CONDITIONAL([SECTION7],false)
341 AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output])
342fi
343
344# should the build process be building only the documentation?
345AC_MSG_CHECKING(whether to build only documentation)
346AC_ARG_ENABLE([documentation-only],
347 [AS_HELP_STRING([--enable-documentation-only], [build only the documentation])],
348 [documentation_only=${enableval}],
349 [documentation_only=no])
350AC_MSG_RESULT($documentation_only)
351if test "x$documentation_only" = "xyes"
352then
353 AM_CONDITIONAL([DOCUMENTATION_ONLY],true)
354 AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation])
355else
356 AM_CONDITIONAL([DOCUMENTATION_ONLY],false)
357 AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation])
358fi
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
308have_makeinfo_5=false 363have_makeinfo_5=false
309AC_PROG_SED 364if test x"$documentation" = xyes || test x"$documentation_only" = xyes
310AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes])
311if test x"${MAKEINFO_FOUND}" = xyes
312then 365then
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
325else
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'.])
327fi 385fi
328AM_CONDITIONAL([HAVE_MAKEINFO_5], [test x$have_makeinfo_5 = xtrue]) 386AM_CONDITIONAL([HAVE_MAKEINFO_5], [test x$have_makeinfo_5 = xtrue])
329 387
@@ -693,63 +751,6 @@ AC_CHECK_LIB([kvm],[kvm_open])
693AC_CHECK_LIB([kstat],[kstat_open]) 751AC_CHECK_LIB([kstat],[kstat_open])
694 752
695 753
696# should the build process be building the documentation?
697AC_MSG_CHECKING(whether to build documentation)
698AC_ARG_ENABLE([documentation],
699 [AS_HELP_STRING([--disable-documentation], [do not build the documentation])],
700 [documentation=${enableval}],
701 [documentation=yes])
702AC_MSG_RESULT($documentation)
703if test "x$documentation" = "xyes"
704then
705 AM_CONDITIONAL([DOCUMENTATION],true)
706 AC_DEFINE([DOCUMENTATION],[1],[Building the documentation])
707else
708 AM_CONDITIONAL([DOCUMENTATION],false)
709 AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation])
710fi
711
712# TODO: Include check for mandoc + texi2mdoc.
713# TODO: Rename the switch? Just 'section7' is too vague.
714# mdoc section 7 output.
715AC_MSG_CHECKING(wether to build section 7 mdoc output)
716AC_ARG_ENABLE([section7],
717[AS_HELP_STRING([--disable-section7], [do not build section 7 mdoc output])],
718[section7=${enableval}],
719[section7=yes])
720AC_MSG_RESULT($section7)
721if test "x$section7" = "xyes"
722then
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
732else
733 AM_CONDITIONAL([SECTION7],false)
734 AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output])
735fi
736
737# should the build process be building only the documentation?
738AC_MSG_CHECKING(whether to build only documentation)
739AC_ARG_ENABLE([documentation-only],
740 [AS_HELP_STRING([--enable-documentation-only], [build only the documentation])],
741 [documentation_only=${enableval}],
742 [documentation_only=no])
743AC_MSG_RESULT($documentation_only)
744if test "x$documentation_only" = "xyes"
745then
746 AM_CONDITIONAL([DOCUMENTATION_ONLY],true)
747 AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation])
748else
749 AM_CONDITIONAL([DOCUMENTATION_ONLY],false)
750 AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation])
751fi
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?
755AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY) 756AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY)