pspp-dev
[Top][All Lists]
Advanced

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

[patch] fix problems with older makeinfo


From: Ben Pfaff
Subject: [patch] fix problems with older makeinfo
Date: Tue, 04 Aug 2009 06:03:13 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

I've grown tired of the reports of problems with makeinfo and
@clicksequence, so I've prepared the following change, which
fixes the problem for me with older Texinfo versions.  Does this
look good to you guys?

I've omitted the texinfo.tex file from this email because it
makes the email very large without much benefit.

commit f1b222dfe590907140f129c704c95389fa904095
Author: Ben Pfaff <address@hidden>
Date:   Tue Aug 4 06:01:21 2009 -0700

    Fix missing @clicksequence problem with older Texinfo versions.
    
    The @clicksequence command was introduced in Texinfo 4.12, which a lot of
    users do not yet have.  This commit fixes the problem by detecting whether
    makeinfo supports @clicksequence and, if not, defining a macro for it as
    a substitute.
    
    We also need support for @clicksequence in texinfo.tex.  It is possible to
    detect whether @clicksequence is defined using TeX code and, if not,
    define a TeX macro for it.  However, I'm not sure how to do that.  So this
    commit instead adds a known-good texinfo.tex to the source tree, which
    should have the same effect.

diff --git a/.gitignore b/.gitignore
index b50c6a3..ad89bf3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,7 +30,6 @@ potfiles.tmp
 pref.h
 reloc-ldflags
 stamp-h1
-texinfo.tex
 gitlog-to-changelog
 *~
 *.o
diff --git a/acinclude.m4 b/acinclude.m4
index 75fcb0d..a3275a3 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -282,4 +282,26 @@ AC_DEFUN([PSPP_GSL_NEEDS_FGNU89_INLINE],
         CFLAGS="$CFLAGS -fgnu89-inline"
      fi])
 ])
-dnl acinclude.m4 ends here
+
+AC_DEFUN([PSPP_CHECK_CLICKSEQUENCE],
+  [AC_REQUIRE([AM_INIT_AUTOMAKE])  # Defines MAKEINFO
+   AC_CACHE_CHECK([whether makeinfo supports @clicksequence],
+     [pspp_cv_have_clicksequence],
+     [cat > conftest.texi  <<EOF
address@hidden conftest.info
address@hidden @click{} Open}
+EOF
+      echo "configure:__oline__: running $MAKEINFO conftest.texi 
>&AS_MESSAGE_LOG_FD" >&AS_MESSAGE_LOG_FD
+      eval "$MAKEINFO conftest.texi >&AS_MESSAGE_LOG_FD 2>&1"
+      retval=$?
+      echo "configure:__oline__: \$? = $retval" >&AS_MESSAGE_LOG_FD
+      if test $retval = 0; then
+       pspp_cv_have_clicksequence=yes
+      else
+       pspp_cv_have_clicksequence=no
+      fi
+      rm -f conftest.texi conftest.info])
+   if test $pspp_cv_have_clicksequence = no; then
+       AM_MAKEINFOFLAGS="$AM_MAKEINFOFLAGS -DMISSING_CLICKSEQUENCE"
+       AC_SUBST([AM_MAKEINFOFLAGS])
+   fi])
diff --git a/configure.ac b/configure.ac
index c44fdd5..12e774f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,7 @@ AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 PKG_PROG_PKG_CONFIG
 m4_pattern_forbid([PKG_CHECK_MODULES])
+PSPP_CHECK_CLICKSEQUENCE
 
 AC_ARG_ENABLE(
   anachronistic-dependencies, 
diff --git a/doc/pspp.texinfo b/doc/pspp.texinfo
index 9c50904..562b328 100644
--- a/doc/pspp.texinfo
+++ b/doc/pspp.texinfo
@@ -19,6 +19,13 @@
 \CMDNAME\
 @end macro
 
address@hidden MISSING_CLICKSEQUENCE
address@hidden clicksequence = asis
address@hidden click {}
+->
address@hidden macro
address@hidden ifset
+
 @iftex
 @finalout
 @end iftex




reply via email to

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