pcre2test: avoid using readline headers with libedit
When asked to enable libedit in a system that ALSO has readline, the headers of the former would be found and used by the earlier. While that would mostly work, some functions will be missing definitions (which is forbidden in C99), so instead abort the configuration and let the user provide for them.
This commit is contained in:
parent
28c42594c3
commit
15db5d3631
|
@ -6,7 +6,6 @@ else(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY AND NCURSES_LIBRARY)
|
||||||
FIND_PATH(EDITLINE_INCLUDE_DIR readline.h PATH_SUFFIXES
|
FIND_PATH(EDITLINE_INCLUDE_DIR readline.h PATH_SUFFIXES
|
||||||
editline
|
editline
|
||||||
edit/readline
|
edit/readline
|
||||||
readline
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(EDITLINE_LIBRARY NAMES edit)
|
FIND_LIBRARY(EDITLINE_LIBRARY NAMES edit)
|
||||||
|
|
|
@ -601,7 +601,7 @@ fi
|
||||||
# headers in different places. Try to cover the most common ones.
|
# headers in different places. Try to cover the most common ones.
|
||||||
|
|
||||||
if test "$enable_pcre2test_libedit" = "yes"; then
|
if test "$enable_pcre2test_libedit" = "yes"; then
|
||||||
AC_CHECK_HEADERS([editline/readline.h edit/readline/readline.h readline/readline.h], [
|
AC_CHECK_HEADERS([editline/readline.h edit/readline/readline.h], [
|
||||||
HAVE_LIBEDIT_HEADER=1
|
HAVE_LIBEDIT_HEADER=1
|
||||||
break
|
break
|
||||||
])
|
])
|
||||||
|
@ -942,7 +942,7 @@ if test "$enable_pcre2test_libedit" = "yes"; then
|
||||||
fi
|
fi
|
||||||
if test -z "$HAVE_LIBEDIT_HEADER"; then
|
if test -z "$HAVE_LIBEDIT_HEADER"; then
|
||||||
echo "** Cannot --enable-pcre2test-libedit because neither editline/readline.h"
|
echo "** Cannot --enable-pcre2test-libedit because neither editline/readline.h"
|
||||||
echo "** nor readline/readline.h was found."
|
echo "** nor edit/readline/readline.h was found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if test -z "$LIBEDIT"; then
|
if test -z "$LIBEDIT"; then
|
||||||
|
|
Loading…
Reference in New Issue