com php-src: use pkg-config for libedit: UPGRADING ext/readline/config.m4

From: Date: Tue, 19 Feb 2019 08:10:06 +0000
Subject: com php-src: use pkg-config for libedit: UPGRADING ext/readline/config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104713@lists.php.net to get a copy of this message
Commit: b537203d20d7c1c425aee44d00f1d53758ac8747 Author: Remi Collet <remi@php.net> Tue, 19 Feb 2019 09:10:06 +0100 Parents: 2850e09cbc389c0496cd24afe64029c65ebb7ca4 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b537203d20d7c1c425aee44d00f1d53758ac8747 Log: use pkg-config for libedit Changed paths: M UPGRADING M ext/readline/config.m4 Diff: diff --git a/UPGRADING b/UPGRADING index 6176e29..c1a3c19 100644 --- a/UPGRADING +++ b/UPGRADING @@ -378,6 +378,9 @@ The following extensions are affected: . --with-pcre-regex has been removed. Instead --with-external-pcre is provided to opt into using an external PCRE library, rather than the bundled one. +- Readline: + . --with-libedit no longer accepts a directory. + - GD: . --with-gd becomes --enable-gd (whether to enable the extension at all) and --with-external-gd (to opt into using an external libgd, rather than the diff --git a/ext/readline/config.m4 b/ext/readline/config.m4 index d11a2c1..21f4f63 100644 --- a/ext/readline/config.m4 +++ b/ext/readline/config.m4 @@ -1,7 +1,7 @@ dnl config.m4 for extension readline PHP_ARG_WITH(libedit,for libedit readline replacement, -[ --with-libedit[=DIR] Include libedit readline replacement (CLI/CGI only)]) +[ --with-libedit Include libedit readline replacement (CLI/CGI only)]) if test "$PHP_LIBEDIT" = "no"; then PHP_ARG_WITH(readline,for readline support, @@ -76,16 +76,13 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then AC_DEFINE(HAVE_LIBREADLINE, 1, [ ]) elif test "$PHP_LIBEDIT" != "no"; then - - for i in $PHP_LIBEDIT /usr/local /usr; do - test -f $i/include/editline/readline.h && LIBEDIT_DIR=$i && break - done - - if test -z "$LIBEDIT_DIR"; then - AC_MSG_ERROR(Please reinstall libedit - I cannot find readline.h) + if test "$PHP_LIBEDIT" != "yes"; then + AC_MSG_WARN([libedit directory ignored, rely on pkg-config]) fi - PHP_ADD_INCLUDE($LIBEDIT_DIR/include) + PKG_CHECK_MODULES([EDIT], [libedit]) + PHP_EVAL_LIBLINE($EDIT_LIBS, READLINE_SHARED_LIBADD) + PHP_EVAL_INCLINE($EDIT_CFLAGS) AC_CHECK_LIB(ncurses, tgetent, [ @@ -99,39 +96,38 @@ elif test "$PHP_LIBEDIT" != "no"; then PHP_CHECK_LIBRARY(edit, readline, [ - PHP_ADD_LIBRARY_WITH_PATH(edit, $LIBEDIT_DIR/$PHP_LIBDIR, READLINE_SHARED_LIBADD) ], [ AC_MSG_ERROR(edit library required by readline not found) ], [ - -L$READLINE_DIR/$PHP_LIBDIR + $READLINE_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(edit, rl_callback_read_char, [ AC_DEFINE(HAVE_RL_CALLBACK_READ_CHAR, 1, [ ]) ],[],[ - -L$READLINE_DIR/$PHP_LIBDIR + $READLINE_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(edit, rl_on_new_line, [ AC_DEFINE(HAVE_RL_ON_NEW_LINE, 1, [ ]) ],[],[ - -L$READLINE_DIR/$PHP_LIBDIR + $READLINE_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(edit, rl_completion_matches, [ AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1, [ ]) ],[],[ - -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS + $READLINE_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(edit, history_list, [ AC_DEFINE(HAVE_HISTORY_LIST, 1, [ ]) ],[],[ - -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS + $READLINE_SHARED_LIBADD ]) AC_DEFINE(HAVE_LIBEDIT, 1, [ ])

« previous php.cvs (#104713) next »