texinfo-commits
[Top][All Lists]
Advanced

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

[6497] --disable-xs


From: Gavin D. Smith
Subject: [6497] --disable-xs
Date: Wed, 05 Aug 2015 18:52:07 +0000

Revision: 6497
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6497
Author:   gavin
Date:     2015-08-05 18:52:05 +0000 (Wed, 05 Aug 2015)
Log Message:
-----------
--disable-xs

Modified Paths:
--------------
    trunk/NEWS
    trunk/README-hacking
    trunk/configure.ac
    trunk/tp/Makefile.am
    trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm
    trunk/tp/Texinfo/Convert/XSParagraph/configure.ac
    trunk/tp/texi2any.pl

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS  2015-08-04 11:39:46 UTC (rev 6496)
+++ trunk/NEWS  2015-08-05 18:52:05 UTC (rev 6497)
@@ -24,17 +24,24 @@
 -------------------------------------------------------------------------------
 * Language:
   . You can now optionally miss out the @menu from nodes with other
-    nodes below them in the document structure.  If you use 
+    nodes below them in the document structure.  If you use
     "@validatemenus off" near the start of a Texinfo file,
     makeinfo will, where needed, create a menu for nodes lacking one 
     given explicitly.
 
 * makeinfo
+  . Some Perl modules have been rewritten in C to increase speed.
+    Disable at build time with "configure --disable-perl-xs".  The 
+    environment variable `TEXINFO_XS' controls how they are used by 
+    makeinfo.  (IN PROGRESS)
   . quotation marks are left out for node names and index entries in
     Info output where they would have been produced by commands such
     as @file or @option.
 
 * info
+  . new user variable `xref-rendition' enables underlining and
+    highlighting of cross-references (IN PROGRESS)
+  . new command M-x tree-search to search all subnodes of a node (IN PROGRESS)
   . internal changes to reduce memory use and increase speed of
     searches, relative to last release
 

Modified: trunk/README-hacking
===================================================================
--- trunk/README-hacking        2015-08-04 11:39:46 UTC (rev 6496)
+++ trunk/README-hacking        2015-08-05 18:52:05 UTC (rev 6497)
@@ -82,7 +82,10 @@
 
 To run the output "tp/texi2any" instead, you can set the environment
 variable TEXINFO_DEV_SOURCE to 1.  Otherwise, it will try to use
-Texinfo's Perl modules in the installed locations.
+Texinfo's Perl modules in the installed locations.  "tp/texi2any" uses
+the Perl interpreter found by configure, so you might want to run that 
+instead of texi2any.pl if it's different to the default interpreter in 
+your environment.
 
 
 

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac  2015-08-04 11:39:46 UTC (rev 6496)
+++ trunk/configure.ac  2015-08-05 18:52:05 UTC (rev 6497)
@@ -345,7 +345,19 @@
 
 AC_SUBST([USE_EXTERNAL_LIBINTL])
 
+AC_ARG_ENABLE([perl-xs],
+    AC_HELP_STRING([--enable-perl-xs],
+              [build Perl XS modules for speed (default: yes)]),
+    [if test $enableval = 'no'; then
+       disable_xs=yes
+     else
+       disable_xs=no
+     fi],
+     [disable_xs=no])
+AC_SUBST([disable_xs])
+AM_CONDITIONAL([DISABLE_XS], [test "z$disable_xs" = 'zyes'])
 
+
 # Tests.
 AC_CONFIG_FILES([install-info/tests/defs])
 dnl Except we cannot enable the TeX-related tests,

Modified: trunk/tp/Makefile.am
===================================================================
--- trunk/tp/Makefile.am        2015-08-04 11:39:46 UTC (rev 6496)
+++ trunk/tp/Makefile.am        2015-08-05 18:52:05 UTC (rev 6497)
@@ -25,10 +25,18 @@
        cd $(srcdir) \
        && $(SHELL) ./maintain/regenerate_docstr.sh "$@"
 
-SUBDIRS = Texinfo/Convert/XSParagraph
-#SUBDIRS =
+
+SUBDIRS =
+if ! DISABLE_XS
+SUBDIRS += Texinfo/Convert/XSParagraph
+endif
+
 SUBDIRS += . tests
 
+DIST_SUBDIRS = Texinfo/Convert/XSParagraph tests
+# Necessary ?
+
+
 bin_SCRIPTS = texi2any
 
 do_subst = sed \
@@ -45,6 +53,7 @@
   -e 's,address@hidden@],$(USE_EXTERNAL_EASTASIANWIDTH),g' \
   -e 's,address@hidden@],$(USE_EXTERNAL_UNIDECODE),g' \
   -e 's,address@hidden@],$(TEXINFO_DTD_VERSION),g' \
+  -e 's,address@hidden@],$(disable_xs),g' \
   -e '1 s,/usr/bin/env perl,$(PERL),g'
 
 texi2any: texi2any.pl $(top_builddir)/config.status

Modified: trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm 2015-08-04 11:39:46 UTC 
(rev 6496)
+++ trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm 2015-08-05 18:52:05 UTC 
(rev 6497)
@@ -99,6 +99,12 @@
   return undef;
 }
 
+our $disable_XS;
+if ($disable_XS) {
+  _fatal "use of XS modules was disabled when Texinfo was built";
+  goto FALLBACK;
+}
+
 my ($libtool_dir, $libtool_archive) = _find_file("XSParagraph.la");
 if (!$libtool_archive) {
   _fatal "XSParagraph: couldn't find Libtool archive file";

Modified: trunk/tp/Texinfo/Convert/XSParagraph/configure.ac
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/configure.ac   2015-08-04 11:39:46 UTC 
(rev 6496)
+++ trunk/tp/Texinfo/Convert/XSParagraph/configure.ac   2015-08-05 18:52:05 UTC 
(rev 6497)
@@ -39,12 +39,27 @@
           AC_SUBST([PERL_CONF_$1], [$conf_value])
          ])
 
-AC_PATH_PROG([PERL], [perl])
+AC_ARG_ENABLE([perl-xs],
+    AC_HELP_STRING([--enable-perl-xs],
+              [build Perl XS modules for speed (default: yes)]),
+    [if test $enableval = 'no'; then
+       disable_xs=yes
+     else
+       disable_xs=no
+     fi],
+     [disable_xs=no])
 
-# It's essential that we use the same compiler that was used to build
-# Perl.  Otherwise Perl's "config.h" will be incorrect.
-lookup_perl_conf([cc])
-CC=$conf_value
+# See (automake)Conditional Subdirectories.  Even if --disable-perl-xs
+# is given, we still need to configure this directory minimally, so that
+# "make dist" will work.
+if test x$disable_xs != xyes; then
+  AC_PATH_PROG([PERL], [perl])
+  
+  # It's essential that we use the same compiler that was used to build
+  # Perl.  Otherwise Perl's "config.h" will be incorrect.
+  lookup_perl_conf([cc])
+  CC=$conf_value
+fi
 
 AC_PROG_CC
 
@@ -53,7 +68,11 @@
 
 LT_INIT
 
+# The above are still necessary for --disable-perl-xs even though they 
+# aren't really used: otherwise, configure complains about undefined
+# variables.
 
+if test x$disable_xs != xyes; then
 lookup_perl_flags([ccflags])
 lookup_perl_flags([cccdlflags])
 
@@ -65,6 +84,9 @@
 
 AC_PATH_PROG([XSUBPP], [xsubpp])
 
+AC_CONFIG_HEADERS([config.h:config.in])
+
+fi # not disable_xs
+
 AC_CONFIG_FILES([Makefile lib/Makefile])
-AC_CONFIG_HEADERS([config.h:config.in])
 AC_OUTPUT

Modified: trunk/tp/texi2any.pl
===================================================================
--- trunk/tp/texi2any.pl        2015-08-04 11:39:46 UTC (rev 6496)
+++ trunk/tp/texi2any.pl        2015-08-05 18:52:05 UTC (rev 6497)
@@ -65,7 +65,6 @@
       $ENV{'top_builddir'} = File::Spec->catdir($command_directory, $updir);
     }
     # In-source run.
-    #warn "in source\n";
     my $lib_dir = File::Spec->catdir($ENV{'top_builddir'}, 'tp');
 
     unshift @INC, $lib_dir;
@@ -92,6 +91,15 @@
   }
 } # end BEGIN
 
+BEGIN {
+  my $disable_xs = '@disable_xs@';
+  if ($disable_xs eq 'yes') {
+    package Texinfo::Convert::XSParagraph::XSParagraph;
+    our $disable_XS;
+    $disable_XS = 1;
+  }
+}
+
 use Locale::Messages;
 use Texinfo::Common;
 




reply via email to

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