0001-Add-disable-doc-option.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 0d56b6327f6b652511c3e4c72382f4dc4d194e10 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Thu, 15 Mar 2018 20:12:28 +0100
  4. Subject: [PATCH] Add --disable-doc option
  5. This option allows the user to disable man pages even if pod2man and
  6. doxygen programs are found
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. Upstream-status: Accepted (https://github.com/rurban/safeclib/commit/86404f0e2a7f2a9cad9c916b643594d4d07721d1)
  9. ---
  10. Makefile.am | 2 ++
  11. configure.ac | 10 ++++++++++
  12. 2 files changed, 12 insertions(+)
  13. diff --git a/Makefile.am b/Makefile.am
  14. index 0f65c5c1..ce1424bb 100644
  15. --- a/Makefile.am
  16. +++ b/Makefile.am
  17. @@ -104,6 +104,7 @@ LIBTOOL_DISTCLEAN_FILES = \
  18. build-tools/test-driver
  19. DISTCLEANFILES = .version
  20. +if ENABLE_DOC
  21. MAN1_SOURCES = doc/man/man1/check_for_unsafe_apis.1
  22. dist_man_MANS =
  23. if HAVE_POD2MAN
  24. @@ -560,6 +561,7 @@ clean-local:
  25. rm -rf $(builddir)/doc/html
  26. rm -rf $(builddir)/doc/man
  27. endif
  28. +endif
  29. if ENABLE_GCOV
  30. gcov: check
  31. diff --git a/configure.ac b/configure.ac
  32. index 0e4e5eea..33ed7326 100644
  33. --- a/configure.ac
  34. +++ b/configure.ac
  35. @@ -339,6 +339,16 @@ else
  36. AC_MSG_RESULT([no (default)])
  37. fi
  38. +AC_ARG_ENABLE(doc,
  39. + AS_HELP_STRING([--disable-doc],
  40. + [disable documentation @<:@default=no@:>@]),
  41. + [case "${enableval}" in
  42. + yes) enable_doc=true ;;
  43. + no) enable_doc=false ;;
  44. + *) AC_MSG_ERROR([bad value ${enableval} for --enable-doc]) ;;
  45. + esac], [enable_doc=true])
  46. +AM_CONDITIONAL(ENABLE_DOC, test "x$enable_doc" = "xtrue")
  47. +
  48. dnl for windows dllimport. checking pic_flag DLL_EXPORT would be better,
  49. dnl but this is only enabled for the shared objs, and we need it in the config
  50. dnl for our tests.
  51. --
  52. 2.14.1