From 4bc3a9d4dea3500da797c4121af4f9342943e347 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Fri, 9 May 2008 11:54:55 +0000 Subject: [PATCH] Debian ships a package which provides ncurses5-config but no header files. Work around this (buggy) situation. --- configure.ac | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index fc9524b7..67ee0b7a 100644 --- a/configure.ac +++ b/configure.ac @@ -139,11 +139,16 @@ if test x"$with_libncurses" != x"no" ; then AC_SEARCH_LIBS([tgetent], [ncurses], [curses_available=yes; AC_CHECK_HEADERS([term.h curses.h],,[curses_available=no])]) else - curses_available=yes - NCURSES_CFLAGS=`$NCURSES_CONFIG --cflags` - NCURSES_LIBS=`$NCURSES_CONFIG --libs` - AC_SUBST(NCURSES_CFLAGS) - AC_SUBST(NCURSES_LIBS) + old_cflags=$CFLAGS + CFLAGS=$CFLAGS `$NCURSES_CONFIG --cflags` + AC_CHECK_HEADERS([term.h curses.h],[curses_available=yes]) + CFLAGS=$old_cflags + if test x"$curses_available" = x"yes" ; then + NCURSES_LIBS=`$NCURSES_CONFIG --libs` + NCURSES_CFLAGS=`$NCURSES_CONFIG --cflags` + AC_SUBST(NCURSES_CFLAGS) + AC_SUBST(NCURSES_LIBS) + fi fi if test x"$curses_available" = x"yes" ; then AC_DEFINE([LIBNCURSES_USABLE], 1, -- 2.30.2