changeset 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 d49157ddd78f
children 0a5da48ccaaf
files dist-files.mk src/of-miscellaneous-2-fixes.patch
diffstat 2 files changed, 50 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Sat Apr 21 10:47:40 2018 -0400
+++ b/dist-files.mk	Sat Apr 21 11:13:04 2018 -0400
@@ -497,6 +497,7 @@
   of-ltfat.mk \
   of-mapping.mk \
   of-miscellaneous-1-fixes.patch \
+  of-miscellaneous-2-fixes.patch \
   of-miscellaneous.mk \
   of-nan.mk \
   of-netcdf.mk \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-miscellaneous-2-fixes.patch	Sat Apr 21 11:13:04 2018 -0400
@@ -0,0 +1,49 @@
+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