52 lines
1.6 KiB
Diff
52 lines
1.6 KiB
Diff
From 3e7467b231de015ec9f31a4982206e9d79f3f948 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
|
<alexey.pawlow@gmail.com>
|
|
Date: Thu, 17 Jun 2021 18:52:09 +0530
|
|
Subject: [PATCH 053/N] build: Fix ncursesw include lookup
|
|
|
|
Mirror what is already done for libffi; Look it up via
|
|
pkg-config and use the exported path via sysconfig in setup.py
|
|
---
|
|
Makefile.pre.in | 4 ++++
|
|
configure.ac | 9 ++++++++-
|
|
2 files changed, 12 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
|
index cfe8634..e7c7b89 100644
|
|
--- a/Makefile.pre.in
|
|
+++ b/Makefile.pre.in
|
|
@@ -347,6 +347,10 @@ IO_OBJS= \
|
|
Modules/_io/bytesio.o \
|
|
Modules/_io/stringio.o
|
|
|
|
+##########################################################################
|
|
+
|
|
+NCURSESW_INCLUDEDIR= @NCURSESW_INCLUDEDIR@
|
|
+
|
|
##########################################################################
|
|
# Parser
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 19b866a..a566bba 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -6900,10 +6900,17 @@ AS_VAR_IF([have_panel], [no], [
|
|
AC_MSG_RESULT([$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)])
|
|
])
|
|
|
|
+if test -n "$PKG_CONFIG"; then
|
|
+ NCURSESW_INCLUDEDIR="`"$PKG_CONFIG" ncursesw --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
|
|
+else
|
|
+ NCURSESW_INCLUDEDIR=""
|
|
+fi
|
|
+AC_SUBST(NCURSESW_INCLUDEDIR)
|
|
+
|
|
# first curses header check
|
|
ac_save_cppflags="$CPPFLAGS"
|
|
if test "$cross_compiling" = no; then
|
|
- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
|
|
+ CPPFLAGS="$CPPFLAGS -I$NCURSESW_INCLUDEDIR"
|
|
fi
|
|
|
|
# On Solaris, term.h requires curses.h
|