Skip to content

Commit

Permalink
configure test for stdscr
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Oct 16, 2024
1 parent 4102862 commit e5a9ac1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,26 @@ else
[AC_CHECK_HEADERS([term.h], [],
[AC_MSG_ERROR([can not find required term header file])])])
fi

AC_MSG_CHECKING([for stdscr])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
/*
#include <ProvideCurses.h>
#include <ProvideTerm.h>
*/
/* extern WINDOW* stdscr; */
/* int keypad(WINDOW* win, bool enable); */
]], [[
WINDOW* foo; /*checks if the header is included*/
keypad(stdscr, 0);
]])],
[
cat config.log | tail -n 100
AC_MSG_RESULT(yes)],
[
cat config.log | tail -n 100
AC_MSG_RESULT(no)
AC_MSG_ERROR([stdscr not found])])
CFLAGS=$htop_save_CFLAGS

if test "$enable_static" = yes; then
Expand Down

0 comments on commit e5a9ac1

Please sign in to comment.