Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Respect ./configure --htmldir, keeping our default



On Mon, 25 May 2009 18:13:49 +0000
Clint Adams <clint@xxxxxxx> wrote:
> On Mon, May 25, 2009 at 07:06:29PM +0100, Peter Stephenson wrote:
> > But I'm not sure what's going on here anyway.  Anything that needs to be
> > configurable in the make system is either set by configure or if for
> > some reason that's not appropriate is overridden using shell syntax.
> > Should this be an option to configure?
> 
> Bump the AC_PREREQ to 2.59c and you should guarantee its existence.

So the question is how we keep the same default but use any value on the
command line.  This tests whether the value is the configure default, which
is a value you'd never give on the command line, but it's a bit brittle
since the default can potentially change.  I don't know how to second guess
the standard argument processing; does anyone know?  (This is a completely
different problem from adding an argument not supported internally by
autoconf.)

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.124
diff -u -r1.124 configure.ac
--- configure.ac	16 May 2009 12:13:00 -0000	1.124
+++ configure.ac	26 May 2009 09:19:49 -0000
@@ -26,7 +26,7 @@
 dnl
 
 AC_INIT(Src/zsh.h)
-AC_PREREQ(2.53b)
+AC_PREREQ(2.59c)
 AC_CONFIG_HEADER(config.h)
 
 dnl What version of zsh are we building ?
@@ -304,6 +304,12 @@
 AC_SUBST(scriptdir)dnl
 AC_SUBST(sitescriptdir)dnl
 
+dnl htmldir is already handled, but if it wasn't set, use
+dnl the standard zsh default.
+if test x$htmldir = x'${docdir}' || test x$htmldir = x; then
+  htmldir='$(datadir)/$(tzsh)/htmldoc'
+fi
+
 AH_TEMPLATE([CUSTOM_PATCHLEVEL],
 [Define to a custom value for the ZSH_PATCHLEVEL parameter])
 AC_ARG_ENABLE(custom-patchlevel,
Index: Config/defs.mk.in
===================================================================
RCS file: /cvsroot/zsh/zsh/Config/defs.mk.in,v
retrieving revision 1.14
diff -u -r1.14 defs.mk.in
--- Config/defs.mk.in	13 Mar 2008 11:11:04 -0000	1.14
+++ Config/defs.mk.in	26 May 2009 09:19:49 -0000
@@ -50,7 +50,7 @@
 sitefndir       = @sitefndir@
 scriptdir       = @scriptdir@
 sitescriptdir   = @sitescriptdir@
-htmldir         = $(datadir)/$(tzsh)/htmldoc
+htmldir         = @htmldir@
 
 # compilation
 CC              = @CC@


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author