view src/of-miscellaneous-2-fixes.patch @ 4683:ffb45d855a81

of-miscellanous: allow build to work with ncurses/termcap.h
author John W. Eaton <jwe@octave.org>
date Sat, 21 Apr 2018 11:13:04 -0400
parents
children
line wrap: on
line source

diff -uNr a/src/configure.ac b/src/configure.ac
--- a/src/configure.ac	2014-06-05 02:17:00.000000000 -0400
+++ b/src/configure.ac	2018-04-21 11:03:02.000000000 -0400
@@ -6,7 +6,10 @@
   [],
   [AC_CHECK_HEADER([termcap.h],
     [],
-    [AC_MSG_ERROR([Unable to find ncurses library headers.])]
+    [AC_CHECK_HEADER([ncurses/termcap.h],
+      [],
+      [AC_MSG_ERROR([Unable to find ncurses library headers.])]
+    ])
   ])
 )
 
diff -uNr a/src/text_waitbar.cc b/src/text_waitbar.cc
--- a/src/text_waitbar.cc	2014-06-05 02:17:00.000000000 -0400
+++ b/src/text_waitbar.cc	2018-04-21 11:03:37.000000000 -0400
@@ -23,6 +23,8 @@
 #  include <term.h>
 #elif defined (HAVE_TERMCAP_H)
 #  include <termcap.h>
+#elif defined (HAVE_NCURSES_TERMCAP_H)
+#  include <ncurses/termcap.h>
 #endif
 };
 
diff -uNr a/src/configure b/src/configure
--- a/src/configure	2014-06-05 02:18:24.000000000 -0400
+++ b/src/configure	2018-04-21 11:06:46.000000000 -0400
@@ -3205,10 +3205,18 @@
 if test "x$ac_cv_header_termcap_h" = xyes; then :
 
 else
+  ac_fn_c_check_header_mongrel "$LINENO" "ncurses/termcap.h" "ac_cv_header_ncurses_termcap_h" "$ac_includes_default"
+if test "x$ac_cv_header_ncurses_termcap_h" = xyes; then :
+
+else
   as_fn_error $? "Unable to find ncurses library headers." "$LINENO" 5
 
 fi
 
+
+
+fi
+
 
 
 fi