Skip to content

Commit 2c5f2b3

Browse files
committed
Add warning when building with Readline library
Readline library is licensed under the GNU GPL 3, which is not compatible with PHP upstream license.
1 parent 626d1b3 commit 2c5f2b3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmake/ext/readline/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ cmake_dependent_option(
2929
"EXT_READLINE"
3030
OFF
3131
)
32+
mark_as_advanced(EXT_READLINE_LIBREADLINE)
3233

3334
add_feature_info(
3435
"ext/readline with GNU Readline"
@@ -106,6 +107,14 @@ if(NOT EXT_READLINE_LIBREADLINE)
106107
CACHE INTERNAL "Whether Editline is used for readline extension"
107108
)
108109
else()
110+
message(
111+
WARNING
112+
"The GNU Readline library is licensed under the GNU GPL 3, which is not "
113+
"compatible with the PHP license. The recommended library for using and "
114+
"distributing the PHP 'readline' extension without limitations is libedit. "
115+
"To build with libedit, remove the 'EXT_READLINE_LIBREADLINE', or set it "
116+
"to 'OFF'."
117+
)
109118
find_package(Readline)
110119
set_package_properties(
111120
Readline

0 commit comments

Comments
 (0)