0001-configure-add-without-demo-option.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Add options to enable/disable docs and demos
  2. Originally written by Anthony Viallard
  3. <viallard@syscom-instruments.com>.
  4. [Vincent: adapt patch to 5.0.5 version]
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  7. --- a/configure.ac 2019-11-27 23:52:29.000000000 +0100
  8. +++ b/configure.ac 2020-02-13 10:24:50.801842269 +0100
  9. @@ -755,6 +755,16 @@ if test "$with_cwdrc" = yes; then
  10. [ Define if you want to read .gnuplot from current directory (SECURITY RISK!).])
  11. fi
  12. +dnl Whether we want to build the doc files
  13. +dnl Does nothing here, is passed on to the doc subdir
  14. +AC_ARG_ENABLE(doc,dnl
  15. +[ --disable-doc do not build doc files])
  16. +
  17. +dnl Whether we want to build the demo files
  18. +dnl Does nothing here, is passed on to the demo subdir
  19. +AC_ARG_ENABLE(demo,dnl
  20. +[ --disable-demo do not build demo files])
  21. +
  22. dnl Disable experimental support for nonlinear axes
  23. AC_ARG_WITH(nonlinear-axes,dnl
  24. [ --without-nonlinear-axes disable support for nonlinear axes])
  25. @@ -1236,6 +1246,24 @@ if test -n "${DIST_CONTACT}"; then
  26. AC_DEFINE_UNQUOTED([DIST_CONTACT],["$DIST_CONTACT"],[Contact address for modified and binary distributed gnuplot versions])
  27. fi
  28. +dnl build doc files
  29. +if test "$enable_doc" != no; then
  30. + AC_CONFIG_SUBDIRS(docs)
  31. + DOCSUBDIR=docs
  32. +else
  33. + DOCSUBDIR=
  34. +fi
  35. +AC_SUBST(DOCSUBDIR)
  36. +
  37. +dnl build demo files
  38. +if test "$enable_demo" != no; then
  39. + AC_CONFIG_SUBDIRS(demo)
  40. + DEMOSUBDIR=demo
  41. +else
  42. + DEMOSUBDIR=
  43. +fi
  44. +AC_SUBST(DEMOSUBDIR)
  45. +
  46. dnl Substitute variables
  47. AC_SUBST(PACKAGE)
  48. AC_SUBST(VERSION_MAJOR)
  49. --- a/Makefile.am 2019-11-19 22:57:18.000000000 +0100
  50. +++ b/Makefile.am 2020-02-13 10:17:55.753012739 +0100
  51. @@ -1,7 +1,7 @@
  52. ## Process this file with automake to produce Makefile.in -*-Makefile-*-
  53. AUTOMAKE_OPTIONS = foreign
  54. -SUBDIRS = config m4 term src docs man demo tutorial share
  55. +SUBDIRS = config m4 term src $(DOCSUBDIR) man $(DEMOSUBDIR) tutorial share
  56. EXTRA_DIST = BUGS Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \
  57. Makefile.maint PATCHLEVEL PGPKEYS README RELEASE_NOTES \