[PATCH] Look for <ncurses/ncurses.h>

Mark Kettenis kettenis@chello.nl
Sun Aug 15 10:07:00 GMT 2004


There are systems out there that have ncurses.h in a subdirectory.
IIRC there were versions of ncurses that used such a directory layout
by default; installing ncurses.h or curses.h in /usr/local/include was
optional.

This doesn't solve the problems MichaelC was having on a particular
alpha*-dec-osf* system, but it brings a more satisfactory solution a
bit closer.

Committed,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* configure.in: Add <ncurses/ncurses.h> to the list of possible
	curses headers.
	* configure, config.in: Regenerate.	
	* gdb_curses.h [HAVE_NCURSES_NCURSES_H]: Include
	<ncurses/ncurses.h>.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.164
diff -u -p -r1.164 configure.in
--- configure.in 13 Aug 2004 20:16:46 -0000 1.164
+++ configure.in 15 Aug 2004 10:00:53 -0000
@@ -430,7 +430,7 @@ case $host_os in
    Solaris 2.[789] when using GCC. ]])
     fi ;;
 esac
-AC_CHECK_HEADERS(curses.h cursesX.h ncurses.h term.h)
+AC_CHECK_HEADERS(curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h)
 
 # FIXME: kettenis/20030102: In most cases we include these
 # unconditionally, so what's the point in checking these?
Index: gdb_curses.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_curses.h,v
retrieving revision 1.2
diff -u -p -r1.2 gdb_curses.h
--- gdb_curses.h 9 Aug 2004 19:29:27 -0000 1.2
+++ gdb_curses.h 15 Aug 2004 10:00:53 -0000
@@ -22,7 +22,9 @@
 #ifndef GDB_CURSES_H
 #define GDB_CURSES_H 1
 
-#if defined (HAVE_NCURSES_H)
+#if defined (HAVE_NCURSES_NCURSES_H)
+#include <ncurses/ncurses.h>
+#elif defined (HAVE_NCURSES_H)
 #include <ncurses.h>
 #elif defined (HAVE_CURSESX_H)
 #include <cursesX.h>
@@ -30,4 +32,4 @@
 #include <curses.h>
 #endif
 
-#endif
+#endif /* gdb_curses.h */



More information about the Gdb-patches mailing list