SOLARIS: Look for ncurses in ncurses/ncurses.h
authorAndrew Deason <adeason@sinenomine.net>
Fri, 4 Jan 2013 19:18:40 +0000 (14:18 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Sat, 5 Jan 2013 14:28:22 +0000 (06:28 -0800)
Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there.

Without this, on Solaris 11.1 we will detect libncurses automatically
(because it lives in /usr/lib), but not ncurses.h (since it is in
ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h,
but will try to link to libncurses, which, as you might guess, fails
with various undefined symbols.

Change-Id: Ia174e2a3c97318d6db2a48a6098569aede93522c
Reviewed-on: http://gerrit.openafs.org/8874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

acinclude.m4
src/gtx/curses_test.c
src/gtx/gtxcurseswin.h

index 0f14797..694de8a 100644 (file)
@@ -1324,6 +1324,7 @@ AC_CHECK_HEADERS([ \
                   math.h \
                   mntent.h \
                   ncurses.h \
+                  ncurses/ncurses.h \
                   netdb.h \
                   netinet/in.h \
                   pthread_np.h \
index 808b628..c2710d1 100644 (file)
@@ -22,6 +22,8 @@
 
 #if defined(HAVE_NCURSES_H)
 # include <ncurses.h>
+#elif defined(HAVE_NCURSES_NCURSES_H)
+# include <ncurses/ncurses.h>
 #elif defined(HAVE_CURSES_H)
 # include <curses.h>
 #endif
index d513ea1..be88e07 100644 (file)
@@ -18,6 +18,8 @@
 
 #if defined(HAVE_NCURSES_H)
 # include <ncurses.h>
+#elif defined(HAVE_NCURSES_NCURSES_H)
+# include <ncurses/ncurses.h>
 #elif defined(HAVE_CURSES_H)
 # include <curses.h>
 #endif