texinfo-commits
[Top][All Lists]
Advanced

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

[6775] don't configure in XSParagraph subdirectory using AC_CONFIG_SUBDI


From: Gavin D. Smith
Subject: [6775] don't configure in XSParagraph subdirectory using AC_CONFIG_SUBDIRS
Date: Tue, 10 Nov 2015 12:38:53 +0000

Revision: 6775
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6775
Author:   gavin
Date:     2015-11-10 12:38:52 +0000 (Tue, 10 Nov 2015)
Log Message:
-----------
don't configure in XSParagraph subdirectory using AC_CONFIG_SUBDIRS

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/configure.ac

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-11-09 22:57:45 UTC (rev 6774)
+++ trunk/ChangeLog     2015-11-10 12:38:52 UTC (rev 6775)
@@ -1,3 +1,13 @@
+2015-11-10  Gavin Smith  <address@hidden>
+
+       * configure.ac: Pass on all the options we were passed when 
+       calling configure in the XSParagraph subdirectory.  Don't use 
+       AC_CONFIG_SUBDIRS for this subdirectory, to save configuring
+       it twice.  When testing if we can build and load Perl extension 
+       modules, pass -I flags to Perl to put directories containing 
+       files at start of module search path.  Account for out-of-source 
+       builds by using srcdir variable.
+
 2015-11-09  Gavin Smith  <address@hidden>
 
        * tp/Texinfo/Convert/XSParagraph/TestXS.pm: Remove mentions of 

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac  2015-11-09 22:57:45 UTC (rev 6774)
+++ trunk/configure.ac  2015-11-10 12:38:52 UTC (rev 6775)
@@ -12,6 +12,7 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
+configure_options="$@"
 AC_INIT([GNU Texinfo], [6.0dev], address@hidden)
 
 dnl Must come before AM_INIT_AUTOMAKE.
@@ -358,19 +359,31 @@
     [ enable_xs=$enableval],
     [ enable_xs=check])
 
-AC_CONFIG_SUBDIRS([tp/Texinfo/Convert/XSParagraph])
+# Pass on all the options we were given to the subsidiary configure 
+# script.
+# Don't use AC_CONFIG_SUBDIRS for this because it isn't done right away,
+# and we need it for the check that follows.
+# We should have some processing of the options here: see 
+# _AC_OUTPUT_SUBDIRS internal autoconf macro in
+# /usr/share/autoconf/autoconf/status.m4.
+#
+(mkdir -p tp/Texinfo/Convert/XSParagraph \
+ && cd tp/Texinfo/Convert/XSParagraph \
+ && ../../../../${srcdir}/tp/Texinfo/Convert/XSParagraph/configure \
+        --disable-option-checking $configure_options)
+
 if test $enable_xs = check; then
   AC_MSG_CHECKING([whether we can build Perl extension modules])
   enable_xs=no
   (cd tp/Texinfo/Convert/XSParagraph \
-   && ./configure PERL=${PERL} && make TestXS.la \
-    && ${PERL} -w fail.pl | grep 'message from XS module') >/dev/null \
+   && make clean \
+   && make TestXS.la \
+   && ${PERL} -I . \
+              -I ../../../../${srcdir}/tp/Texinfo/Convert/XSParagraph \
+              -w ../../../../${srcdir}/tp/Texinfo/Convert/XSParagraph/fail.pl \
+      | grep 'message from XS module') >/dev/null \
   && enable_xs=yes
   AC_MSG_RESULT([$enable_xs])
-  # There is a problem here of not passing on all the options we 
-  # were given to the subsidiary configure script.  This could lead the
-  # test to give the wrong answer, in which case the user would need to 
-  # give --enable-perl-xs or --disable-perl-xs themselves.
 fi
 
 AC_SUBST([enable_xs])




reply via email to

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