[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6545] test whether XS modules can be built
From: |
Gavin D. Smith |
Subject: |
[6545] test whether XS modules can be built |
Date: |
Tue, 18 Aug 2015 18:15:01 +0000 |
Revision: 6545
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6545
Author: gavin
Date: 2015-08-18 18:15:01 +0000 (Tue, 18 Aug 2015)
Log Message:
-----------
test whether XS modules can be built
Modified Paths:
--------------
trunk/configure.ac
trunk/tp/Makefile.am
trunk/tp/texi2any.pl
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2015-08-18 17:41:09 UTC (rev 6544)
+++ trunk/configure.ac 2015-08-18 18:15:01 UTC (rev 6545)
@@ -354,17 +354,29 @@
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'])
+ [build Perl XS modules for speed (default: check)]),
+ [ enable_xs=$enableval],
+ [ enable_xs=check])
+if test $enable_xs = check; then
+ AC_MSG_CHECKING([whether we can build Perl extension modules])
+ enable_xs=no
+ (cd tp/TestXS && ./configure PERL=${PERL} && make \
+ && ${PERL} -w fail.pl | grep 'message from XS module') >/dev/null \
+ && enable_xs=yes
+ AC_MSG_RESULT([$enable_xs])
+ # We can't use AC_CONFIG_SUBDIRS here because it isn't executed right
+ # away. There is the problem of not passing on all the options we
+ # were given to the subsidiary configure script. If the check gets it
+ # wrong the user needs to give --enable-perl-xs or --disable-perl-xs
+ # themselves.
+fi
+AC_SUBST([enable_xs])
+
+AM_CONDITIONAL([DISABLE_XS], [test "z$enable_xs" = zno])
+
+
# 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-18 17:41:09 UTC (rev 6544)
+++ trunk/tp/Makefile.am 2015-08-18 18:15:01 UTC (rev 6545)
@@ -34,7 +34,7 @@
SUBDIRS += . tests
DIST_SUBDIRS = Texinfo/Convert/XSParagraph tests
-# Necessary ?
+DIST_SUBDIRS += TestXS
bin_SCRIPTS = texi2any
@@ -179,7 +179,7 @@
# $(document_strings_mo_files) and $(test_copied_include_files) come from
# generated makefiles, Makefile.tres and Makefile.documents_strings_mo_files
all-local: maintain/catalog.xml $(document_strings_mo_files) \
- $(test_copied_include_files)
+ $(test_copied_include_files)
tp_tests = prove.sh
Modified: trunk/tp/texi2any.pl
===================================================================
--- trunk/tp/texi2any.pl 2015-08-18 17:41:09 UTC (rev 6544)
+++ trunk/tp/texi2any.pl 2015-08-18 18:15:01 UTC (rev 6545)
@@ -92,8 +92,8 @@
} # end BEGIN
BEGIN {
- my $disable_xs = '@disable_xs@';
- if ($disable_xs eq 'yes') {
+ my $enable_xs = '@enable_xs@';
+ if ($enable_xs eq 'no') {
package Texinfo::Convert::XSParagraph::XSParagraph;
our $disable_XS;
$disable_XS = 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6545] test whether XS modules can be built,
Gavin D. Smith <=