<<< Date Index >>>     <<< Thread Index >>>

[PATCH] bug1708: man(1) doesn't accept absolute path



http://bugs.guug.de/db/17/1708.html

Some OSes need absolute path for ".so" directive,
while others need relative path.
This patch takes care of the difference
in order to avoid duplicated manuals.

-- 
tamo
Index: configure.in
===================================================================
RCS file: /home/roessler/cvs/mutt/configure.in,v
retrieving revision 3.21
diff -u -r3.21 configure.in
--- configure.in        31 Jan 2005 02:40:14 -0000      3.21
+++ configure.in        4 Feb 2005 12:17:13 -0000
@@ -469,6 +469,23 @@
 docdir=$mutt_cv_docdir
 AC_SUBST(docdir)
 
+AC_MSG_CHECKING([whether man(1) accepts absolute path])
+rm -fr $srcdir/man1
+mkdir $srcdir/man1
+cp $srcdir/doc/muttbug.man $srcdir/man1/muttbug.1
+echo ".so `pwd`/man1/muttbug.1" > $srcdir/man1/flea.1
+if env PAGER=true man -M $srcdir 1 flea 2>/dev/null
+then
+       MAN_SO_DIR=$mandir/
+       mutt_cv_mancapa=yes
+else
+       MAN_SO_DIR=
+       mutt_cv_mancapa=no
+fi
+rm -fr $srcdir/man1
+AC_MSG_RESULT($mutt_cv_mancapa)
+AC_SUBST(MAN_SO_DIR)
+
 if test x$mutt_cv_setgid = xyes; then
         DOTLOCK_GROUP='mail'
         DOTLOCK_PERMISSION=2755
Index: doc/Makefile.in
===================================================================
RCS file: /home/roessler/cvs/mutt/doc/Makefile.in,v
retrieving revision 3.4
diff -u -r3.4 Makefile.in
--- doc/Makefile.in     30 Apr 2004 06:49:37 -0000      3.4
+++ doc/Makefile.in     4 Feb 2005 12:22:20 -0000
@@ -16,6 +16,7 @@
 top_srcdir=@top_srcdir@
 top_builddir = ..
 VPATH = @srcdir@
+MAN_SO_DIR = @MAN_SO_DIR@
 @SET_MAKE@
 
 INSTALL = @INSTALL@
@@ -75,7 +76,7 @@
        $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
        $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man5
        ./instdoc $(srcdir)/mutt.man $(DESTDIR)$(mandir)/man1/mutt.1
-       ./instdoc $(srcdir)/muttbug.man $(DESTDIR)$(mandir)/man1/flea.1
+       echo ".so $(MAN_SO_DIR)man1/muttbug.1" > $(DESTDIR)$(mandir)/man1/flea.1
        ./instdoc $(srcdir)/muttbug.man $(DESTDIR)$(mandir)/man1/muttbug.1
        ./instdoc $(srcdir)/dotlock.man \
                $(DESTDIR)$(mandir)/man1/mutt_dotlock.1