diff --git a/Makefile.am b/Makefile.am index c3392b52477..c2155927414 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,6 @@ AUTOMAKE_OPTIONS = dist-bzip2 1.5 foreign SUBDIRS = \ compat \ contrib \ - doc \ errors \ icons @@ -25,6 +24,10 @@ SUBDIRS += \ tools \ test-suite +if ENABLE_DOCUMENTATION +SUBDIRS += doc +endif + DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` diff --git a/configure.ac b/configure.ac index 12a984c682f..9b65b085315 100644 --- a/configure.ac +++ b/configure.ac @@ -135,21 +135,15 @@ AS_IF([test "x$PKG_CONFIG" = "x"],[ AC_MSG_WARN([pkg-config not found. Many optional features with external dependencies will not be enabled by default, usually without further warnings.]) ]) - AC_PATH_PROG(PERL, perl, none) AS_IF([test "x$ac_cv_path_PERL" = "xnone"],[ AC_MSG_FAILURE([Perl is required to compile Squid. Please install Perl and then re-run configure ]) ]) -AC_PATH_PROG(POD2MAN, pod2man, $FALSE) -AM_CONDITIONAL(ENABLE_POD2MAN_DOC, test "x${ac_cv_path_POD2MAN}" != "x$FALSE") AC_PATH_PROG(AR, ar, $FALSE) AR_R="$AR r" AC_SUBST(AR_R) -AC_PATH_PROG(LINUXDOC, linuxdoc, $FALSE) -AM_CONDITIONAL(ENABLE_RELEASE_DOCS, test "x${ac_cv_path_LINUXDOC}" != "x$FALSE") - SQUID_RELEASE=`echo $VERSION | cut -d. -f1` AC_SUBST(SQUID_RELEASE) @@ -364,6 +358,25 @@ SQUID_CFLAGS="$SQUID_CFLAGS $squid_cv_cc_arg_pipe" # possibly include some build info tag into squid -v SQUID_EMBED_BUILD_INFO +AC_ARG_ENABLE(documentation, + AS_HELP_STRING([--enable-documentation],[ + Build optional documentation. + Requires linuxdoc and pod2man. + ]),[ + SQUID_YESNO([$enableval],[--enable-documentation]) +]) +AS_IF([test "x$enable_documentation" = "xyes"],[ + AC_CHECK_TOOL([LINUXDOC],[linuxdoc],[:]) + AS_IF([test "$LINUXDOC" = ":"],[ + AC_MSG_FAILURE([linuxdoc is required to compile Squid documentation. Please install linuxdoc tools and then re-run configure.]) + ]) + AC_CHECK_TOOL([POD2MAN],[pod2man],[:]) + AS_IF([test "$POD2MAN" = ":"],[ + AC_MSG_FAILURE([pod2man is required to compile Squid documentation. Please install pod2man and then re-run configure.]) + ]) +]) +AM_CONDITIONAL(ENABLE_DOCUMENTATION,[test "x$enable_documentation" = "xyes"]) + AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--disable-optimizations], [Do not compile Squid with compiler optimizations enabled. diff --git a/doc/release-notes/Makefile.am b/doc/release-notes/Makefile.am index b903725140f..e9c1cb88ade 100644 --- a/doc/release-notes/Makefile.am +++ b/doc/release-notes/Makefile.am @@ -5,11 +5,10 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -# requires the linuxdoc tools -if ENABLE_RELEASE_DOCS - DOC= release-$(SQUID_RELEASE) +EXTRA_DIST= $(DOC).sgml + SUFFIXES= .sgml.in .sgml .sgml.in.sgml: @@ -20,31 +19,21 @@ SUFFIXES= .sgml.in .sgml < $< >$@ test `grep -c "@SQUID" $@` -eq 0 +if ENABLE_DOCUMENTATION .sgml.txt: - linuxdoc -B txt --filter $< + $(LINUXDOC) -B txt --filter $< .sgml.html: - linuxdoc -B html -T 2 --split=0 $< - perl -i -p -e "s%$@%%" $@ - cp -p $@ $(top_builddir)/RELEASENOTES.html + $(LINUXDOC) -B html -T 2 --split=0 $< && $(PERL) -i -p -e "s%$@%%" $@ .sgml.man: - linuxdoc -B txt --manpage $< + $(LINUXDOC) -B txt --manpage $< .sgml.info: - linuxdoc -B info $< - -dist-hook: $(DOC).html - @if test -f $(builddir)/$(DOC).html; then \ - cp -p $(builddir)/$(DOC).html $(top_distdir)/RELEASENOTES.html; \ - fi - -EXTRA_DIST= $(DOC).html + $(LINUXDOC) -B info $< CLEANFILES= \ *.html \ *.tex *.ps *.dvi *.aux *.log *.toc \ - *.txt *.man \ - $(top_builddir)/RELEASENOTES.html - + *.txt *.man endif diff --git a/doc/release-notes/release-8.sgml.in b/doc/release-notes/release-8.sgml.in index 8ddb88821e7..9538e4a5a18 100644 --- a/doc/release-notes/release-8.sgml.in +++ b/doc/release-notes/release-8.sgml.in @@ -144,7 +144,8 @@ This section gives an account of those changes in three categories: New options