Merge branch 'vuntz-panel-headers'

This commit is contained in:
Martijn van Brummelen
2016-08-04 09:14:52 +02:00
2 changed files with 13 additions and 3 deletions

View File

@@ -21,7 +21,14 @@ PKG_CHECK_MODULES(
CFLAGS="${CFLAGS} ${PANEL_CFLAGS}"
LIBS="${LIBS} ${PANEL_LIBS}"
],
[AC_CHECK_LIB([panel], [main], ,[AC_MSG_ERROR([ncurses panel library not found])])]
[AC_CHECK_LIB([panel], [main], [
LIBS="-lpanel $LIBS"
AC_CHECK_HEADERS(panel.h,, [
AC_CHECK_HEADERS(ncurses/panel.h, [
AC_DEFINE([PANEL_IN_SUBDIR], [ncurses/], [Look for ncurses headers in subdir])
], [AC_MSG_ERROR([ncurses panel headers not found])])
])
], [AC_MSG_ERROR([ncurses panel library not found])])]
)
PKG_CHECK_MODULES(

View File

@@ -70,12 +70,15 @@ extern int log_current_element;
extern int log_elements_allocated;
extern pthread_mutex_t mutex1;
/* Ncurses headers. Assume panel.h is in same place.*/
/* Ncurses headers. */
#ifdef NCURSES_IN_SUBDIR
#include <ncurses/ncurses.h>
#include <ncurses/panel.h>
#else
#include <ncurses.h>
#endif
#ifdef PANEL_IN_SUBDIR
#include <ncurses/panel.h>
#else
#include <panel.h>
#endif