stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] [PATCH] Make install-info configurable


From: Teemu Likonen
Subject: [STUMP] [PATCH] Make install-info configurable
Date: Sun, 05 Jul 2009 23:59:26 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

This change drops the hard-coded install-info from Makefile.in and makes
configure script check the program from the path. Only a warning is
displayed when install-info doesn't exist because info manual is not
essential for compiling. It is also possible to configure install-info
by passing variable INSTALL_INFO to "make" command.

The previous hard-coded install-info works usually fine but in Debian
GNU/Linux systems there are two versions for the program:
/usr/sbin/install-info and /usr/bin/ginstall-info. The former is
Debian's custom tool and the latter is the more common GNU install-info.
(It seems that there are plans to drop the custom version and switch to
the GNU version.) The GNU version is more friendly when installing info
manuals with normal user's access; therefore this change is probably
welcomed by Debian users who want to install StumpWM under $HOME.

Signed-off-by: Teemu Likonen <address@hidden>
---
 Makefile.in  |    6 ++++--
 configure.ac |    6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index eab7a9f..32f1388 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,6 +14,8 @@ exec_prefix= @exec_prefix@
 address@hidden@
 address@hidden@
 
address@hidden@
+
 # You shouldn't have to edit past this
 
 # This is copied from the .asd file. It'd be nice to have the list in
@@ -61,11 +63,11 @@ install: stumpwm.info stumpwm
        install -m 755 stumpwm "$(destdir)$(bindir)"
        test -z "$(destdir)$(infodir)" || mkdir -p "$(destdir)$(infodir)"
        install -m 644 stumpwm.info "$(destdir)$(infodir)"
-       install-info --info-dir="$(destdir)$(infodir)" 
"$(destdir)$(infodir)/stumpwm.info"
+       $(INSTALL_INFO) --info-dir="$(destdir)$(infodir)" 
"$(destdir)$(infodir)/stumpwm.info"
 
 uninstall:
        rm "$(destdir)$(bindir)/stumpwm"
-       install-info --info-dir="$(destdir)$(infodir)" --remove 
"$(destdir)$(infodir)/stumpwm.info"
+       $(INSTALL_INFO) --info-dir="$(destdir)$(infodir)" --remove 
"$(destdir)$(infodir)/stumpwm.info"
        rm "$(destdir)$(infodir)/stumpwm.info"
 
 # End of file
diff --git a/configure.ac b/configure.ac
index 519369e..ccd972f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,12 @@ if test "$MAKEINFO" = "no"; then
    AC_MSG_ERROR([Please install makeinfo for the manual.])
 fi
 
+AC_CHECK_PROG(INSTALL_INFO,install-info,yes,no)
+
+if test "$INSTALL_INFO" = "no"; then
+   AC_MSG_WARN([install-info is needed to install the info manual.])
+fi
+
 AC_CHECK_PROG(XDPYINFO,xdpyinfo,yes,no)
 if test "$XDPINFO" = "no"; then
    AC_MSG_WARN([xdpyinfo is needed for xinerama support.])
-- 
1.6.3.3.385.g60647





reply via email to

[Prev in Thread] Current Thread [Next in Thread]