summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Garrigues <bertrand.garrigues@laposte.net>2018-11-19 00:24:11 +0100
committerBertrand Garrigues <bertrand.garrigues@laposte.net>2018-11-19 00:24:11 +0100
commit2226128d39a505bf71bbb63f0d8e3c0d16aef550 (patch)
tree02d73fa48741817ac71aa0e82b199e71fc2c42a2
parent38dfd0b568376d371286af261235c44bda7b5abc (diff)
downloadgroff-git-2226128d39a505bf71bbb63f0d8e3c0d16aef550.tar.gz
Fix build on environment where /etc/papersize contains comments
Issue introduced on commit efea81c75f831ddc6717c2ef25556e0f49d1f679. * m4/groff.m4 (GROFF_PAGE): remove comments and get the 1st string of '/etc/papersize'.
-rw-r--r--ChangeLog9
-rw-r--r--m4/groff.m42
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 81bbff2a0..d58a88584 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-11-19 Bertrand Garrigues <bertrand.garrigues@laposte.net>
+
+ Fix build on environment where /etc/papersize contains comments
+
+ Issue introduced on commit efea81c75f831ddc6717c2ef25556e0f49d1f679.
+
+ * m4/groff.m4 (GROFF_PAGE): remove comments and get the 1st string
+ of '/etc/papersize'.
+
2018-11-13 G. Branden Robinson <g.branden.robinson@gmail.com>
[hdtbl] Don't clean other people's unit tests.
diff --git a/m4/groff.m4 b/m4/groff.m4
index cc2ef3238..f9b5f138f 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -779,7 +779,7 @@ AC_DEFUN([GROFF_PAGE],
groff_prefix=$prefix
test "x$prefix" = "xNONE" && groff_prefix=$ac_default_prefix
if test -z "$PAGE" && test -r /etc/papersize; then
- PAGE=`cat /etc/papersize`
+ PAGE=`cat /etc/papersize | sed -e 's/^[ ]*#.*//g' | tr -d "\n" | awk '{ print $1 }'`
fi
if test -z "$PAGE"; then
descfile=