Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH (the last?) Re: Termcap saga again

On May 9,  5:03am, Bart Schaefer wrote:
} On May 8,  7:25pm, Peter Stephenson wrote:
} }
} } In that case I shall commit the following.
} Unfortunately, that has now broken my build on RedHat 5.2 and 6.2.

Ok, this seems to have got it.  I put all of PWS's new code into the
not-found branch of a new AC_CHECK_HEADERS call that checks for ONLY
curses.h.  The empty if-found branch correctly results in an AC_DEFINE
call as needed.

I then forced the AC_CHECK_HEADERS to fail by the simple expedient of
changing the name of the file to one that doesn't exist, and thereby
verified that AC_TRY_COMPILE in the not-found branch works correctly.

By virtue of using AC_CHECK_HEADERS, autoheader discovers that we're
looking for curses.h and it's no longer necessary to have a #undef for
it in acconfig.h, which increases my confidence that everything will
work right.  I hate having to add things explicitly to acconfig.h.

Since term.h is now alone in its own call to AC_CHECK_HEADERS, I took
the opportunity to remove an explicit `if test ...' and simply move the
code that followed into the if-found branch of that macro.

Index: acconfig.h
--- acconfig.h	2001/05/09 04:42:10	1.5
+++ acconfig.h	2001/05/09 05:19:35
@@ -318,8 +318,5 @@
 /* Define if you have the terminfo strnames symbol.  */
-/* Define if we have curses.h */
 /* Define if term.h chokes without curses.h */
Index: configure.in
--- configure.in	2001/05/09 04:42:10	1.8
+++ configure.in	2001/05/09 05:25:35
@@ -562,15 +562,14 @@
 AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
 case "$LIBS" in
-AC_CACHE_CHECK(for curses.h, ac_cv_header_curses_h,
+AC_CHECK_HEADERS(curses.h, [],
+AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_h,
 AC_TRY_COMPILE([#include <curses.h>], [],
-if test x$ac_cv_header_term_h = xyes; then
-AC_MSG_CHECKING(if term.h needs curses.h)
+[AC_MSG_CHECKING(if term.h needs curses.h)
 AC_TRY_COMPILE([#include <term.h>], [char **test = boolcodes;], boolcodes_with_only_term_h=yes,
 AC_TRY_COMPILE([#include <curses.h>
@@ -620,8 +619,7 @@
 #include <term.h>], [char **test = strnames; printf(*test);],
 AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
 dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

Messages sorted by: Reverse Date, Date, Thread, Author