Skip to content

Commit a27010d

Browse files
fix: unescaped LDVERSION in Android pkgconfig
This used to happen as LDVERSION was used in BLDLIBRARY declaration, which was eventually used for LIBPYTHON. LDVERSION was thus changed to be expanded at Makefile generation time. Furthermore, there were two places where LDVERSION was been assigned. In order to make things simpler, it is only defined and assigned once now. LDVERSION was used in between the two assignments with different values, but was used as '$(LDVERSION)', which means it was substituted to the later value assigned in Makefiles at build time. So this should ideally have no impact on the end user or the build process
1 parent dfd1070 commit a27010d

File tree

2 files changed

+123
-123
lines changed

2 files changed

+123
-123
lines changed

configure

Lines changed: 79 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,50 @@ INSTSONAME='$(LDLIBRARY)'
14341434
DLLLIBRARY=''
14351435
LDLIBRARYDIR=''
14361436
RUNSHARED=''
1437-
LDVERSION="$VERSION"
1437+
1438+
# For calculating the .so ABI tag.
1439+
AC_SUBST([ABIFLAGS])
1440+
AC_SUBST([ABI_THREAD])
1441+
ABIFLAGS=""
1442+
ABI_THREAD=""
1443+
1444+
# Check for --disable-gil
1445+
# --disable-gil
1446+
AC_MSG_CHECKING([for --disable-gil])
1447+
AC_ARG_ENABLE([gil],
1448+
[AS_HELP_STRING([--disable-gil], [enable support for running without the GIL (default is no)])],
1449+
[AS_VAR_IF([enable_gil], [yes], [disable_gil=no], [disable_gil=yes])], [disable_gil=no]
1450+
)
1451+
AC_MSG_RESULT([$disable_gil])
1452+
1453+
if test "$disable_gil" = "yes"
1454+
then
1455+
AC_DEFINE([Py_GIL_DISABLED], [1],
1456+
[Define if you want to disable the GIL])
1457+
# Add "t" for "threaded"
1458+
ABIFLAGS="${ABIFLAGS}t"
1459+
ABI_THREAD="t"
1460+
fi
1461+
1462+
# Check for --with-pydebug
1463+
AC_MSG_CHECKING([for --with-pydebug])
1464+
AC_ARG_WITH([pydebug],
1465+
[AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined (default is no)]) ],
1466+
[
1467+
if test "$withval" != no
1468+
then
1469+
AC_DEFINE([Py_DEBUG], [1],
1470+
[Define if you want to build an interpreter with many run-time checks.])
1471+
AC_MSG_RESULT([yes]);
1472+
Py_DEBUG='true'
1473+
ABIFLAGS="${ABIFLAGS}d"
1474+
else AC_MSG_RESULT([no]); Py_DEBUG='false'
1475+
fi],
1476+
[AC_MSG_RESULT([no])])
1477+
1478+
AC_MSG_CHECKING([LDVERSION])
1479+
LDVERSION="$VERSION$ABIFLAGS"
1480+
AC_MSG_RESULT([$LDVERSION])
14381481

14391482
# LINKCC is the command that links the python executable -- default is $(CC).
14401483
# If CXX is set, and if it is needed to link a main function that was
@@ -1719,46 +1762,6 @@ if test -z "$LN" ; then
17191762
esac
17201763
fi
17211764

1722-
# For calculating the .so ABI tag.
1723-
AC_SUBST([ABIFLAGS])
1724-
AC_SUBST([ABI_THREAD])
1725-
ABIFLAGS=""
1726-
ABI_THREAD=""
1727-
1728-
# Check for --disable-gil
1729-
# --disable-gil
1730-
AC_MSG_CHECKING([for --disable-gil])
1731-
AC_ARG_ENABLE([gil],
1732-
[AS_HELP_STRING([--disable-gil], [enable support for running without the GIL (default is no)])],
1733-
[AS_VAR_IF([enable_gil], [yes], [disable_gil=no], [disable_gil=yes])], [disable_gil=no]
1734-
)
1735-
AC_MSG_RESULT([$disable_gil])
1736-
1737-
if test "$disable_gil" = "yes"
1738-
then
1739-
AC_DEFINE([Py_GIL_DISABLED], [1],
1740-
[Define if you want to disable the GIL])
1741-
# Add "t" for "threaded"
1742-
ABIFLAGS="${ABIFLAGS}t"
1743-
ABI_THREAD="t"
1744-
fi
1745-
1746-
# Check for --with-pydebug
1747-
AC_MSG_CHECKING([for --with-pydebug])
1748-
AC_ARG_WITH([pydebug],
1749-
[AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined (default is no)]) ],
1750-
[
1751-
if test "$withval" != no
1752-
then
1753-
AC_DEFINE([Py_DEBUG], [1],
1754-
[Define if you want to build an interpreter with many run-time checks.])
1755-
AC_MSG_RESULT([yes]);
1756-
Py_DEBUG='true'
1757-
ABIFLAGS="${ABIFLAGS}d"
1758-
else AC_MSG_RESULT([no]); Py_DEBUG='false'
1759-
fi],
1760-
[AC_MSG_RESULT([no])])
1761-
17621765
# Check for --with-trace-refs
17631766
# --with-trace-refs
17641767
AC_MSG_CHECKING([for --with-trace-refs])
@@ -6436,9 +6439,6 @@ fi
64366439
AC_SUBST([EXT_SUFFIX])
64376440
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
64386441

6439-
AC_MSG_CHECKING([LDVERSION])
6440-
LDVERSION='$(VERSION)$(ABIFLAGS)'
6441-
AC_MSG_RESULT([$LDVERSION])
64426442

64436443
# Configure the flags and dependencies used when compiling shared modules.
64446444
# Do not rename LIBPYTHON - it's accessed via sysconfig by package build

0 commit comments

Comments
 (0)