summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-16 08:57:17 +0000
committermidipix <writeonce@midipix.org>2021-06-16 08:57:17 +0000
commitedee3d2f5cc1c7d3bed2378a5c6b60f2882dbc6e (patch)
treedece4d3abbb2be3d7e0c1e2620864136b3695977
parente664b8cb101b9acc46e4fee698e5d21fe36a2785 (diff)
downloadsbpython2-edee3d2f5cc1c7d3bed2378a5c6b60f2882dbc6e.tar.bz2
sbpython2-edee3d2f5cc1c7d3bed2378a5c6b60f2882dbc6e.tar.xz
project: corrected wrapper header and config logic for term.h.
-rw-r--r--project/config/cfgdefs.sh9
-rw-r--r--wrappers/ncurses/term.h4
2 files changed, 11 insertions, 2 deletions
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
index 6826af7..b32129a 100644
--- a/project/config/cfgdefs.sh
+++ b/project/config/cfgdefs.sh
@@ -299,6 +299,9 @@ cfgdefs_perform_common_tests()
cfgtest_unit_header_presence 'ncurses/panel.h' && mb_panel_wrapper='yes'
cfgtest_unit_header_presence 'ncursesw/panel.h' && mb_panel_wrapper='yes'
+ cfgtest_unit_header_presence 'ncurses/term.h' && mb_term_wrapper='yes'
+ cfgtest_unit_header_presence 'ncursesw/term.h' && mb_term_wrapper='yes'
+
if cfgtest_unit_interface_presence 'is_term_resized'; then
cfgtest_makevar_append '-DHAVE_CURSES_IS_TERM_RESIZED'
fi
@@ -357,6 +360,12 @@ cfgdefs_perform_common_tests()
unset mb_panel_wrapper
fi
+ # <term.h>
+ if [ _${mb_term_wrapper:-} = _yes ]; then
+ cfgtest_makevar_append '-I$(PROJECT_DIR)/wrappers/ncurses'
+ unset mb_term_wrapper
+ fi
+
# ncurses libs (common part)
mb_ncurses_libs='-lpanelw -lncursesw'
mb_ncurses_tinfo='-ltinfow'
diff --git a/wrappers/ncurses/term.h b/wrappers/ncurses/term.h
index 426c296..2228ba4 100644
--- a/wrappers/ncurses/term.h
+++ b/wrappers/ncurses/term.h
@@ -1,7 +1,7 @@
-#ifdef HAVE_NCURSESW_PANEL_H
+#ifdef HAVE_NCURSESW_TERM_H
#include <ncursesw/term.h>
#else
-#ifdef HAVE_NCURSES_PANEL_H
+#ifdef HAVE_NCURSES_TERM_H
#include <ncurses/term.h>
#endif
#endif