Richard Stallman writes:
> It seems best to do what Debian is doing, so I wrote this:
> 
> @item htmldir
> The directory for installing the HTML files (if any) for this package.
> (HTML files should be generated from Texinfo sources.)  By default, it
> should be @file{/usr/local/doc/@var{package}}, but it should be written
> as @file{$(prefix)/doc/@var{package}}.

This makes sense to me. But since distributions differ so widely in
the precise location of the documentation (/usr/doc vs. /usr/share/doc
vs. /usr/doc/packages) it'd be nice if that location were selectable
through a "configure" option --docdir.

Here is a patch that would implement this in autoconf-2.13.

*** autoconf-2.13/acgeneral.m4.bak      Tue Jan  5 14:27:37 1999
--- autoconf-2.13/acgeneral.m4  Thu Aug 24 18:14:13 2000
***************
*** 204,209 ****
--- 204,210 ----
  oldincludedir='/usr/include'
  infodir='${prefix}/info'
  mandir='${prefix}/man'
+ docdir='${prefix}/doc'
  
  # Initialize some other variables.
  subdirs=
***************
*** 268,273 ****
--- 269,279 ----
      ac_feature=`echo $ac_feature| sed 's/-/_/g'`
      eval "enable_${ac_feature}=no" ;;
  
+   -docdir | --docdir | --docdi | --docd | --doc | --do)
+     ac_prev=docdir ;;
+   -docdir=* | --docdir=* | --docdi=* | --docd=* | --doc=* | --do=*)
+     docdir="$ac_optarg" ;;
+ 
    -enable-* | --enable-*)
      ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
      # Reject names that are not valid shell variable names.
***************
*** 328,333 ****
--- 334,340 ----
    --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
    --infodir=DIR           info documentation in DIR [PREFIX/info]
    --mandir=DIR            man documentation in DIR [PREFIX/man]
+   --docdir=DIR            HTML documentation in DIR [PREFIX/doc]
    --srcdir=DIR            find the sources in DIR [configure dir or ..]
    --program-prefix=PREFIX prepend PREFIX to installed program names
    --program-suffix=SUFFIX append SUFFIX to installed program names
***************
*** 720,725 ****
--- 727,733 ----
  AC_SUBST(oldincludedir)dnl
  AC_SUBST(infodir)dnl
  AC_SUBST(mandir)dnl
+ AC_SUBST(docdir)dnl
  ])
  
  

Reply via email to