cvs: php-src /ext/ncurses config.m4 php_ncurses.h

From: Date: Sat, 04 Oct 2003 01:04:32 +0000
Subject: cvs: php-src /ext/ncurses config.m4 php_ncurses.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24042@lists.php.net to get a copy of this message
sniper Fri Oct 3 21:04:32 2003 EDT Modified files: /php-src/ext/ncurses config.m4 php_ncurses.h Log: - Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD). Index: php-src/ext/ncurses/config.m4 diff -u php-src/ext/ncurses/config.m4:1.15 php-src/ext/ncurses/config.m4:1.16 --- php-src/ext/ncurses/config.m4:1.15 Fri Oct 3 20:43:06 2003 +++ php-src/ext/ncurses/config.m4 Fri Oct 3 21:04:31 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.15 2003/10/04 00:43:06 sniper Exp $ +dnl $Id: config.m4,v 1.16 2003/10/04 01:04:31 sniper Exp $ dnl PHP_ARG_WITH(ncurses, for ncurses support, @@ -7,21 +7,20 @@ if test "$PHP_NCURSES" != "no"; then - # --with-ncurses -> check with-path - SEARCH_PATH="/usr/local /usr" - SEARCH_FOR="/include/curses.h" + SEARCH_PATH="$PHP_NCURSES /usr/local /usr" - 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 + for i in $SEARCH_PATH ; do + if test -d $i/include; then + if test -r $i/include/ncurses.h; then NCURSES_DIR=$i - AC_MSG_RESULT(found in $i) + AC_DEFINE(HAVE_NCURSES_H,1,[ ]) + break + elif test -r $i/include/curses.h; then + NCURSES_DIR=$i + break fi - done - fi + fi + done if test -z "$NCURSES_DIR"; then AC_MSG_RESULT(not found) Index: php-src/ext/ncurses/php_ncurses.h diff -u php-src/ext/ncurses/php_ncurses.h:1.13 php-src/ext/ncurses/php_ncurses.h:1.14 --- php-src/ext/ncurses/php_ncurses.h:1.13 Tue Jun 10 16:03:33 2003 +++ php-src/ext/ncurses/php_ncurses.h Fri Oct 3 21:04:31 2003 @@ -19,7 +19,11 @@ #ifndef PHP_NCURSES_H #define PHP_NCURSES_H -#include <curses.h> +#ifdef HAVE_NCURSES_H +# include <ncurses.h> +#else +# include <curses.h> +#endif extern int le_ncurses_windows;

« previous php.cvs (#24042) next »