From: foobar Date: Tue, 9 Dec 2003 20:33:22 +0000 (+0000) Subject: MFH: Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/) X-Git-Tag: php-4.3.5RC1~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4115b9aa6c2a151dda793de038577f956a3ba9ed;p=php MFH: Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/) --- diff --git a/NEWS b/NEWS index 4700e79712..5be87c0df1 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP 4 NEWS (Jani) - Fixed header handler in NSAPI SAPI module (header->replace was ignored, send_default_content_type now sends value from php.ini). (Uwe Schindler) +- Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/). (Jani) - Fixed bug #26548 (ext/session: Malformed HTTP dates headers). (Derick) - Fixed bug #26531 (ext/domxml: get_elements_by_tag_name() wildcard fails). (Rob Richards) diff --git a/ext/ncurses/config.m4 b/ext/ncurses/config.m4 index 77e3c252dd..28ae210fce 100644 --- a/ext/ncurses/config.m4 +++ b/ext/ncurses/config.m4 @@ -9,17 +9,21 @@ if test "$PHP_NCURSES" != "no"; 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 + for dir in $SEARCH_PATH; do + for subdir in include/ncurses include; do + if test -d $dir/$subdir; then + if test -r $dir/$subdir/ncurses.h; then + NCURSES_DIR=$dir + NCURSES_INCDIR=$dir/$subdir AC_DEFINE(HAVE_NCURSES_H,1,[ ]) - break - elif test -r $i/include/curses.h; then - NCURSES_DIR=$i - break + break 2 + elif test -r $dir/$subdir/curses.h; then + NCURSES_DIR=$dir + NCURSES_INCDIR=$dir/$subdir + break 2 fi fi + done done if test -z "$NCURSES_DIR"; then @@ -28,7 +32,7 @@ if test "$PHP_NCURSES" != "no"; then fi # --with-ncurses -> add include path - PHP_ADD_INCLUDE($NCURSES_DIR/include) + PHP_ADD_INCLUDE($NCURSES_INCDIR) # --with-ncurses -> chech for lib and symbol presence LIBNAME=ncurses