diff options
author | wl <wl> | 2009-03-07 07:33:49 +0000 |
---|---|---|
committer | wl <wl> | 2009-03-07 07:33:49 +0000 |
commit | 2e0092512a9923bec9a913d391e5928110c3bd4f (patch) | |
tree | b701daa468b247b1ac35f7ad476da72aaf7386d2 /configure.ac | |
parent | 231cbd9e8e7cf2fc5da863fbac8f91ea4a62cc44 (diff) | |
download | groff-2e0092512a9923bec9a913d391e5928110c3bd4f.tar.gz |
Improve configuration.
* configure.ac: Read `VERSION' and `REVISION' files to provide
proper values for AC_INIT.
* Makefile.in: Use `@datarootdir@' and `@docdir@' so that
configure's `--datarootdir' and `--docdir' options are honoured.
Documentation is now by default installed into something like
`/usr/local/share/doc/groff-1.20.1'.
* configure: Regenerated.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 250585ff..bdf80cf4 100644 --- a/configure.ac +++ b/configure.ac @@ -20,8 +20,30 @@ # # Process this file with autoconf to produce a configure script. -AC_INIT -AC_PREREQ(2.59) +dnl Use `VERSION' and `REVISION' files to get version. +m4_define([GROFF_VERSION_DATA], m4_include([VERSION])) +m4_define([GROFF_REVISION_DATA], m4_include([REVISION])) + +dnl Strip off newline characters. +m4_define([GROFF_VERSION], + m4_substr(GROFF_VERSION_DATA, + [0], m4_decr(m4_len(GROFF_VERSION_DATA)))) +m4_define([GROFF_REVISION], + m4_substr(GROFF_REVISION_DATA, + [0], m4_decr(m4_len(GROFF_REVISION_DATA)))) + +dnl Don't use revision if it is zero. +m4_define([GROFF_VERSION_STRING], + m4_if(m4_eval(GROFF_REVISION[ > 0]), + [1], + GROFF_VERSION[.]GROFF_REVISION, + GROFF_VERSION)) + +AC_INIT([groff], + GROFF_VERSION_STRING, + [bug-groff@gnu.org], + [groff-]GROFF_VERSION_STRING) +AC_PREREQ([2.59]) AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin]) AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp]) |