Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D4Pyp-0002Po-4T for mharc-grub-devel@gnu.org; Thu, 24 Feb 2005 15:53:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D4Pyg-0002M8-NQ for grub-devel@gnu.org; Thu, 24 Feb 2005 15:52:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D4PyZ-0002HB-OY for grub-devel@gnu.org; Thu, 24 Feb 2005 15:52:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D4PyZ-0002Go-HA for grub-devel@gnu.org; Thu, 24 Feb 2005 15:52:47 -0500 Received: from [64.105.159.118] (helo=roinet.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1D4PkO-0000yE-D8 for grub-devel@gnu.org; Thu, 24 Feb 2005 15:38:08 -0500 Received: (qmail 26537 invoked from network); 24 Feb 2005 20:38:07 -0000 Received: from mtproxy.roinet.com (HELO dyn147.roinet.com) (192.168.1.1) by roinet.com with SMTP; 24 Feb 2005 20:38:07 -0000 From: Pavel Roskin To: grub-devel@gnu.org Content-Type: multipart/mixed; boundary="=-HCfS/oSa5AFC+KiWX1FI" Date: Thu, 24 Feb 2005 15:38:05 -0500 Message-Id: <1109277485.1907.2.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.1.5 Subject: [PATCH] Check for ncurses X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Feb 2005 20:53:01 -0000 --=-HCfS/oSa5AFC+KiWX1FI Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello! The CVS version of GRUB 2 doesn't compile without ncurses, but it doesn't check for ncurses in configure. The patch adds checks for headers and library. ChangeLog: * configure.ac: Add checks for ncurses. * util/console.c: Include config.h and the ncurses header found by configure. -- Regards, Pavel Roskin --=-HCfS/oSa5AFC+KiWX1FI Content-Disposition: attachment; filename=ncurses.diff Content-Type: text/x-patch; name=ncurses.diff; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- configure.ac +++ configure.ac @@ -97,6 +97,14 @@ AC_DEFINE([NESTED_FUNC_ATTR], [],[Catch gcc bug]) fi +# Check for ncurses. +AC_CHECK_LIB(ncurses, color_set, , [AC_MSG_ERROR([ncurses library not found])]) +ncurses_found= +AC_CHECK_HEADERS(ncurses/curses.h ncurses.h curses.h, [ncurses_found=1; break;]) +if test -z "$ncurses_found"; then + AC_MSG_ERROR([ncurses header not found]) +fi + AC_PROG_INSTALL AC_PROG_MAKE_SET AC_CHECK_TOOL(OBJCOPY, objcopy) --- util/console.c +++ util/console.c @@ -18,7 +18,16 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include +#include + +#if defined(HAVE_NCURSES_CURSES_H) +# include +#elif defined(HAVE_NCURSES_H) +# include +#elif defined(HAVE_CURSES_H) +# include +#endif + #include #include #include --=-HCfS/oSa5AFC+KiWX1FI--