Skip to content

pcre2test: allow using readline headers for libedit #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

carenas
Copy link
Contributor

@carenas carenas commented Apr 10, 2022

An addendum to #96, which brings back the posibility of using readline headers to link with libedit as that might be useful in at least OpenBSD.

Includes some tidy ups but nothing that would change functionality, except for the addition of a HAVE_READLINE_H macro by configure (when that override is triggered) which is currently not being used

At least in OpenBSD, there is a libedit library in base, but without
public headers.  Public headers for readline are available but since
15db5d3 (pcre2test: avoid using readline headers with libedit,
2022-04-07) won't be picked up automatically.

Allow pointing cmake to those headers by doing (for example):

  $ cmake -DEDITLINE_INCLUDE_DIR=/usr/include/readline

Or using custom CPPFLAGS with configure (for example):

  $ CPPFLAGS=-I/usr/include/readline ./configure --enable-pcre2test-libedit

Since the headers from readline.h would be otherwise incomplete, detect
that case and pull the extra headers that are required automagically and
while at it, cleanup the NCURSES dependency that was unnecessarily copied
from readline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants