From 803a0c40f2323c8384e8efcb84fb79bfcc1aca82 Mon Sep 17 00:00:00 2001 From: Rob Funk Date: Fri, 18 Jun 2004 04:57:38 +0000 Subject: Make manServer compatible with modern groff installations svn path=/trunk/; revision=3891 --- dist-tools/manServer.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'dist-tools') diff --git a/dist-tools/manServer.pl b/dist-tools/manServer.pl index 964ba8a7..b2751340 100755 --- a/dist-tools/manServer.pl +++ b/dist-tools/manServer.pl @@ -2462,12 +2462,20 @@ sub doEqn1 sub initialise { + # Determine groff version if possible + my $groffver = `groff -v`; + $groffver =~ /^GNU groff version (\S+)/; + $groffver = $1; + # Parse the macro definition file for section names if (open(MACRO, "/usr/lib/tmac/tmac.an") || open(MACRO, "/usr/lib/tmac/an") || open(MACRO, "/usr/lib/groff/tmac/tmac.an") || + open(MACRO, "/usr/lib/groff/tmac/an.tmac") || open(MACRO, "/usr/share/tmac/tmac.an") || - open(MACRO, "/usr/share/groff/tmac/tmac.an") ) + open(MACRO, "/usr/share/groff/tmac/tmac.an") || + open(MACRO, "/usr/share/groff/tmac/an.tmac") || + open(MACRO, "/usr/share/groff/$groffver/tmac/an.tmac") ) { while () { -- cgit v1.2.3