From: foobar Date: Sat, 4 Oct 2003 01:04:54 +0000 (+0000) Subject: MFH: - Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD). X-Git-Tag: php-4.3.4RC2~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59d28ed4df13f31fa02db54e27496913bc18c7f3;p=php MFH: - Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD). --- diff --git a/NEWS b/NEWS index 0afc3961d3..34ec92cd32 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ PHP 4 NEWS ?? Oct 2003, Version 4.3.4RC2 - Fixed multibyte regex engine to properly handle ".*" pattern under POSIX compatible mode. (K.Kosako , Moriyoshi) +- Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD). (Jani) - Fixed bug #25745 (ctype functions fail with non-ascii characters). (Moriyoshi) - Fixed bug #25744 (make ZTS build of ext/sybase compile). (Ilia) - Fixed bug #25738 (alloca() related issues on the Darwin platform). (Moriyoshi) diff --git a/ext/ncurses/config.m4 b/ext/ncurses/config.m4 index f69fb62fe8..77e3c252dd 100644 --- a/ext/ncurses/config.m4 +++ b/ext/ncurses/config.m4 @@ -7,21 +7,20 @@ PHP_ARG_WITH(ncurses, for ncurses support, if test "$PHP_NCURSES" != "no"; then - # --with-ncurses -> check with-path - SEARCH_PATH="/usr/local /usr" - SEARCH_FOR="/include/curses.h" - - if test -d $PHP_NCURSES/; then # path given as parameter - NCURSES_DIR=$PHP_NCURSES - else # search default path list - AC_MSG_CHECKING(for ncurses files in default path) - for i in $SEARCH_PATH ; do - if test -r $i/$SEARCH_FOR; then + SEARCH_PATH="$PHP_NCURSES /usr/local /usr" + + for i in $SEARCH_PATH ; do + if test -d $i/include; then + if test -r $i/include/ncurses.h; then + NCURSES_DIR=$i + AC_DEFINE(HAVE_NCURSES_H,1,[ ]) + break + elif test -r $i/include/curses.h; then NCURSES_DIR=$i - AC_MSG_RESULT(found in $i) + break fi - done - fi + fi + done if test -z "$NCURSES_DIR"; then AC_MSG_RESULT(not found) diff --git a/ext/ncurses/php_ncurses.h b/ext/ncurses/php_ncurses.h index d8b9874582..c98e07636a 100644 --- a/ext/ncurses/php_ncurses.h +++ b/ext/ncurses/php_ncurses.h @@ -19,7 +19,11 @@ #ifndef PHP_NCURSES_H #define PHP_NCURSES_H -#include +#ifdef HAVE_NCURSES_H +# include +#else +# include +#endif extern int le_ncurses_windows;