Skip to content

Comments

pcre2test: allow using readline headers for libedit#99

Merged
PhilipHazel merged 1 commit intoPCRE2Project:masterfrom
carenas:libedit
Apr 14, 2022
Merged

pcre2test: allow using readline headers for libedit#99
PhilipHazel merged 1 commit intoPCRE2Project:masterfrom
carenas:libedit

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