Now this might even work.

This commit is contained in:
foobar 2001-11-18 22:54:18 +00:00
parent 8dd296dd7d
commit 48697c5f5c

View File

@ -2,12 +2,13 @@ dnl $Id$
dnl config.m4 for extension ncurses
PHP_ARG_WITH(ncurses, for ncurses support,
[ --with-ncurses Include ncurses support])
[ --with-ncurses[=DIR] Include 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 -r $PHP_NCURSES/; then # path given as parameter
NCURSES_DIR=$PHP_NCURSES
else # search default path list
@ -31,20 +32,22 @@ if test "$PHP_NCURSES" != "no"; then
# --with-ncurses -> chech for lib and symbol presence
LIBNAME=ncurses
LIBSYMBOL=initscr
old_LIBS=$LIBS
LIBS="$LIBS -L$NCURSES_DIR/lib -lm"
AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_NCURSESLIB,1,[ ])],
[AC_MSG_ERROR(wrong ncurses lib version or lib not found)])
LIBS=$old_LIBS
PHP_SUBST(NCURSES_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, SAPRFC_SHARED_LIBADD)
PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [
AC_DEFINE(HAVE_NCURSESLIB,1,[ ])
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, NCURSES_SHARED_LIBADD)
], [
AC_MSG_ERROR(Wrong ncurses lib version or lib not found)
], [
-L$NCURSES_DIR/lib -lm"
])
AC_CHECK_LIB(ncurses, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])])
AC_CHECK_LIB(ncurses, slk_color, [AC_DEFINE(HAVE_NCURSES_SLK_COLOR, 1, [ ])])
AC_CHECK_LIB(ncurses, asume_default_colors, [AC_DEFINE(HAVE_NCURSES_ASSUME_DEFAULT_COLORS, 1, [ ])])
AC_CHECK_LIB(ncurses, use_extended_names, [AC_DEFINE(HAVE_NCURSES_USE_EXTENDED_NAMES, 1, [ ])])
PHP_EXTENSION(ncurses, $ext_shared)
PHP_SUBST(NCURSES_SHARED_LIBADD)
fi