From ec2d1f2ff2ab2b46e4257ae15cb755898265d08e Mon Sep 17 00:00:00 2001 From: wlemb Date: Wed, 5 Jun 2002 13:46:41 +0000 Subject: * aclocal.m4 (GROFF_PAGE): Don't use `prefix' directly since it is not initialized at the time we need it in case `--prefix' hasn't been set. Check for `ac_default_prefix' also. Test for `papersize' keyword also and generalize allowed whitespace. * configure: Regenerated. * font/devps/Makefile.sub (DESC): Use `papersize' instead of `paperlength'. * src/libs/libgroff/Makefile.sub (version, revision): Replaced with... (src_version, src_revision): New variables to avoid overwriting from parent make process. (version.cc): Updated. * contrib/mom/Makefile.sub (groff_bin_dirs): Fix typo (forgotten `src' element). * src/preproc/html/pre-html.cc: Include paper.h and font.h. (linebuf, linebufsize): New global variables. (sys_fatal): Use `fatal' to abort properly. (get_line): New function. (get_resolution): Use it. Improve error messages. (get_papersize): Check `papersize' also. Use `get_line'. Improve error messages. --- aclocal.m4 | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index ee75f770..9abb270f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl Autoconf macros for groff. -dnl Copyright (C) 1989-1995, 2001 Free Software Foundation, Inc. +dnl Copyright (C) 1989-1995, 2001, 2002 Free Software Foundation, Inc. dnl dnl This file is part of groff. dnl @@ -239,23 +239,32 @@ dnl dnl AC_DEFUN(GROFF_PAGE, [AC_MSG_CHECKING([default paper size]) +groff_prefix=$prefix +test "x$prefix" = xNONE && groff_prefix=$ac_default_prefix if test -z "$PAGE"; then descfile= - if test -r $prefix/share/groff/font/devps/DESC; then - descfile=$prefix/share/groff/font/devps/DESC - elif test -r $prefix/lib/groff/font/devps/DESC; then - descfile=$prefix/lib/groff/font/devps/DESC + if test -r $groff_prefix/share/groff/font/devps/DESC; then + descfile=$groff_prefix/share/groff/font/devps/DESC + elif test -r $groff_prefix/lib/groff/font/devps/DESC; then + descfile=$groff_prefix/lib/groff/font/devps/DESC else - for f in $prefix/share/groff/*/font/devps/DESC; do + for f in $groff_prefix/share/groff/*/font/devps/DESC; do if test -r $f; then descfile=$f break fi done fi - if test -n "$descfile" \ - && grep "^paperlength 841890" $descfile >/dev/null 2>&1; then - PAGE=A4 + if test -n "$descfile"; then +changequote(,)dnl + if grep '^paperlength[ ]\+841890' $descfile + >/dev/null 2>&1; then + PAGE=A4 + elif grep '^papersize[ ]\+[aA]4' $descfile \ + >/dev/null 2>&1; then + PAGE=A4 + fi +changequote([,])dnl fi fi if test -z "$PAGE"; then -- cgit v1.2.1