[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/configure.ac: move code around, t
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/configure.ac: move code around, to have Perl variables setting in the same block and separate test with Autoconf/Gnulib headers and tests with Perl headers better. |
Date: |
Fri, 31 Jan 2025 11:44:12 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 06533588b7 * tp/Texinfo/XS/configure.ac: move code around, to have
Perl variables setting in the same block and separate test with Autoconf/Gnulib
headers and tests with Perl headers better.
06533588b7 is described below
commit 06533588b7cdc7ac367b5d5868da17a306aa484e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Jan 31 17:44:20 2025 +0100
* tp/Texinfo/XS/configure.ac: move code around, to have Perl variables
setting in the same block and separate test with Autoconf/Gnulib
headers and tests with Perl headers better.
---
ChangeLog | 6 +++
tp/Texinfo/XS/configure.ac | 96 ++++++++++++++++++++++------------------------
2 files changed, 52 insertions(+), 50 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a156ee340d..ba33132bf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-01-31 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/configure.ac: move code around, to have Perl variables
+ setting in the same block and separate test with Autoconf/Gnulib
+ headers and tests with Perl headers better.
+
2025-01-31 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/configure.ac (PERL_CONF_cc): always define.
diff --git a/tp/Texinfo/XS/configure.ac b/tp/Texinfo/XS/configure.ac
index 6ee8672ba5..8e41b26632 100644
--- a/tp/Texinfo/XS/configure.ac
+++ b/tp/Texinfo/XS/configure.ac
@@ -9,7 +9,7 @@
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#
+
AC_INIT([GNU Texinfo], [7.2dev])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
@@ -23,6 +23,13 @@ AC_SUBST([TEXINFO_DTD_VERSION])
CONVERTER=texi2any
AC_SUBST([CONVERTER])
+AC_ARG_ENABLE([additional-checks],
+ AS_HELP_STRING([--enable-additional-checks], [run tests on non-distributed
components]),
+ [ enable_additional_tests=$enableval],
+ [ enable_additional_tests=no])
+
+AM_CONDITIONAL([DISABLE_ADDITIONAL_CHECKS], [test "z$enable_additional_tests"
= zno])
+
AC_PATH_PROG([PERL], [perl])
# Get Perl configuration variables and set derived variables
@@ -112,6 +119,26 @@ AM_MISSING_PROG([XSUBPP], [xsubpp])
XSUBPPARGS="-typemap ${PERL_CONF_privlibexp}/ExtUtils/typemap"
AC_SUBST([XSUBPPARGS], [$XSUBPPARGS])
+# Use the -no-undefined flag on MS-Windows. See info node
+# `(gnulib)Libtool and Windows'. The -L and -l options in
+# platform_PERL_LIBADD show where to find the undefined symbols when
+# linking against Perl.
+case "$host" in *-mingw32 | *-mingw64 | *-cygwin )
+ perl_conf_LDFLAGS="$perl_conf_LDFLAGS -no-undefined"
+ platform_PERL_LIBADD=$perl_conf_LIBS
+ # to be used for shared libraries not linked against Perl.
+ platform_LDFLAGS='-no-undefined'
+ ;;
+esac
+
+AC_SUBST([perl_conf_CFLAGS], [$perl_conf_CFLAGS])
+AC_SUBST([perl_conf_CPPFLAGS], [$perl_conf_CPPFLAGS])
+AC_SUBST([perl_conf_LDFLAGS], [$perl_conf_LDFLAGS])
+AC_SUBST([platform_LDFLAGS], [$platform_LDFLAGS])
+AC_SUBST([platform_PERL_LIBADD], [$platform_PERL_LIBADD])
+AC_SUBST([perl_conf_LIBS], [$perl_conf_LIBS])
+AC_SUBST([perl_conf_EMBED_CFLAGS], [$perl_conf_EMBED_CFLAGS])
+
#PACKAGE_XS_VERSION=`${PERL} -e 'use version; print
version->declare('"$PACKAGE_VERSION"')->numify;'`
# to check that Perl module loading the XS objects and XS objects versions
# match. A hyphen is also turned to a dot for the Perl module version.
@@ -121,21 +148,6 @@ PACKAGE_XS_VERSION=`echo $PACKAGE_VERSION | sed 's/-/./g ;
s/dev$//'`
AC_SUBST([XS_VERSION], [$PACKAGE_XS_VERSION])
-# Before Perl 5.38.0 getenv/setenv and similar cannot be reliably used in
-# XS and could lead to memory corruption, depending on the platform.
-usable_getenv_in_XS=no
-AC_MSG_CHECKING([Perl XS with usable getenv])
-if $PERL -e "use 5.038" >/dev/null 2>&1; then
- usable_getenv_in_XS=yes
-fi
-AC_MSG_RESULT($usable_getenv_in_XS)
-
-if test $usable_getenv_in_XS = yes ; then
- # currently unused
- AC_DEFINE([HAVE_USABLE_GETENV_IN_XS], [1],
- [Define to 1 if getenv can be used in XS])
-fi
-
AC_MSG_CHECKING([ExtUtils::Embed])
if $PERL -e "use 5.008_001; use ExtUtils::Embed;" >/dev/null 2>&1; then
extutils_embed='yes'
@@ -151,12 +163,23 @@ if test "z$extutils_embed" = 'zyes' ; then
PERL_EXTUTILS_EMBED_ldopts=`${PERL} -MExtUtils::Embed -e ldopts`
fi
-AC_ARG_ENABLE([additional-checks],
- AS_HELP_STRING([--enable-additional-checks], [run tests on non-distributed
components]),
- [ enable_additional_tests=$enableval],
- [ enable_additional_tests=no])
+AC_SUBST([PERL_EXTUTILS_EMBED_ccopts], [$PERL_EXTUTILS_EMBED_ccopts])
+AC_SUBST([PERL_EXTUTILS_EMBED_ldopts], [$PERL_EXTUTILS_EMBED_ldopts])
-AM_CONDITIONAL([DISABLE_ADDITIONAL_CHECKS], [test "z$enable_additional_tests"
= zno])
+# Before Perl 5.38.0 getenv/setenv and similar cannot be reliably used in
+# XS and could lead to memory corruption, depending on the platform.
+usable_getenv_in_XS=no
+AC_MSG_CHECKING([Perl XS with usable getenv])
+if $PERL -e "use 5.038" >/dev/null 2>&1; then
+ usable_getenv_in_XS=yes
+fi
+AC_MSG_RESULT($usable_getenv_in_XS)
+
+if test $usable_getenv_in_XS = yes ; then
+ # currently unused
+ AC_DEFINE([HAVE_USABLE_GETENV_IN_XS], [1],
+ [Define to 1 if getenv can be used in XS])
+fi
AC_ARG_ENABLE([perl-xs],
AS_HELP_STRING([--enable-perl-xs],
@@ -168,7 +191,6 @@ AC_ARG_ENABLE([perl-xs],
fi],
[disable_xs=no])
-
# PERL_EXT_var are user variables for a Perl XS extension, allowing
# configuring at the top-level with e.g.
# "./configure CFLAGS='-g -O0' PERL_EXT_CFLAGS='-g'".
@@ -230,12 +252,11 @@ gl_INIT
LT_INIT([disable-static dlopen])
-# Note that the above have to be outside the disable_xs block
-# otherwise it causes an error with configure.
-
AM_CONDITIONAL([HAVE_ICONV],
[test "x$am_func_iconv" = "xyes"])
+AC_CHECK_FUNCS(newlocale strxfrm_l)
+
# This is useful on platforms where gettext functions are present, but
# setting the locale through LANGUAGE is not implemented.
AC_ARG_ENABLE([xs-perl-libintl],
@@ -399,31 +420,6 @@ AM_CONDITIONAL([PERL_EMBEDDED], [test "z$embedded_perl" =
'zyes'])
CFLAGS=$PERL_EXT_CFLAGS
LDFLAGS=$PERL_EXT_LDFLAGS
-# Use the -no-undefined flag on MS-Windows. See info node
-# `(gnulib)Libtool and Windows'. The -L and -l options in
-# platform_PERL_LIBADD show where to find the undefined symbols when
-# linking against Perl.
-case "$host" in *-mingw32 | *-mingw64 | *-cygwin )
- perl_conf_LDFLAGS="$perl_conf_LDFLAGS -no-undefined"
- platform_PERL_LIBADD=$perl_conf_LIBS
- # to be used for shared libraries not linked against Perl.
- platform_LDFLAGS='-no-undefined'
- ;;
-esac
-
-AC_SUBST([perl_conf_CFLAGS], [$perl_conf_CFLAGS])
-AC_SUBST([perl_conf_CPPFLAGS], [$perl_conf_CPPFLAGS])
-AC_SUBST([perl_conf_LDFLAGS], [$perl_conf_LDFLAGS])
-AC_SUBST([platform_LDFLAGS], [$platform_LDFLAGS])
-AC_SUBST([platform_PERL_LIBADD], [$platform_PERL_LIBADD])
-AC_SUBST([perl_conf_LIBS], [$perl_conf_LIBS])
-AC_SUBST([perl_conf_EMBED_CFLAGS], [$perl_conf_EMBED_CFLAGS])
-
-AC_SUBST([PERL_EXTUTILS_EMBED_ccopts], [$PERL_EXTUTILS_EMBED_ccopts])
-AC_SUBST([PERL_EXTUTILS_EMBED_ldopts], [$PERL_EXTUTILS_EMBED_ldopts])
-
-AC_CHECK_FUNCS(newlocale strxfrm_l)
-
# Output these with the _CONFIG suffix as we use the originals as names
# of customization variables.
AC_DEFINE_UNQUOTED([PACKAGE_CONFIG], ["$PACKAGE"],
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/configure.ac: move code around, to have Perl variables setting in the same block and separate test with Autoconf/Gnulib headers and tests with Perl headers better.,
Patrice Dumas <=