summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-07-07 12:47:32 (GMT)
committerGitHub <noreply@github.com>2022-07-07 12:47:32 (GMT)
commit29f86d6c28fa9ed39e42678776d6005eaf5090c8 (patch)
tree6eafbb247352f34f0ce87c372cb2e2da65d779a7 /configure.ac
parented136b96737fdbeff864079d12904cb962c6cce5 (diff)
downloadcpython-29f86d6c28fa9ed39e42678776d6005eaf5090c8.zip
cpython-29f86d6c28fa9ed39e42678776d6005eaf5090c8.tar.gz
cpython-29f86d6c28fa9ed39e42678776d6005eaf5090c8.tar.bz2
gh-94642: Remove -D_XOPEN_SOURCE from more pkg-config CFLAGS (#94657)
Some pkg-config pc files define CFLAGS with -D_XOPEN_SOURCE=600. We always want _XOPEN_SOURCE=700.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fde6172..88219dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5850,6 +5850,8 @@ AS_VAR_IF([with_readline], [edit], [
])
])
+dnl pyconfig.h defines _XOPEN_SOURCE=700
+READLINE_CFLAGS=$(echo $READLINE_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
AC_MSG_CHECKING([how to link readline])
AS_VAR_IF([with_readline], [no], [
@@ -6144,7 +6146,7 @@ AS_VAR_IF([ac_cv_header_ncurses_h], [yes], [
dnl remove _XOPEN_SOURCE macro from curses cflags. pyconfig.h sets
dnl the macro to 700.
-CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//')
+CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
if test "$have_curses" = no -a "$ac_sys_system" = "Darwin"; then
dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw.
@@ -6204,6 +6206,9 @@ AS_VAR_IF([ac_cv_header_panel_h], [yes], [
])dnl ac_cv_header_panel_h = yes
+dnl pyconfig.h defines _XOPEN_SOURCE=700
+PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
+
AC_MSG_CHECKING([panel flags])
AS_VAR_IF([have_panel], [no], [
AC_MSG_RESULT([no])