From: John Darrington Date: Fri, 9 May 2008 11:54:55 +0000 (+0000) Subject: Debian ships a package which provides ncurses5-config but no header files. X-Git-Tag: v0.6.0~14 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=4bc3a9d4dea3500da797c4121af4f9342943e347 Debian ships a package which provides ncurses5-config but no header files. Work around this (buggy) situation. --- 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,