# LIBPCRE2_CHECK_CONFIG ([DEFAULT-ACTION])
# ----------------------------------------------------------
# This macro #defines HAVE_PCRE2_H if required header files are
# found, and sets @LIBPCRE2_LDFLAGS@ and @LIBPCRE2_CFLAGS@ to the necessary
# This macro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_DEFUN([LIBPCRE2_TRY_LINK],
#define PCRE2_CODE_UNIT_WIDTH 8
PCRE2_SIZE error_offset = 0;
pcre2_code *regexp = pcre2_compile("test", PCRE2_ZERO_TERMINATED, PCRE2_UTF, &error, &error_offset, NULL);
AC_DEFUN([LIBPCRE2_CHECK_CONFIG],
If you want to specify libpcre2 installation directories:
AC_HELP_STRING([--with-libpcre2@<:@=DIR@:>@], [use libpcre2 from given base install directory (DIR), default is to search through a number of common places for the libpcre2 files.])],
if test "$withval" = "yes"; then
if test -f /usr/local/include/pcre2.h; then
_libpcre2_dir_lib="$withval/lib"
test "x$withval" = "xyes" && withval=/usr
LIBPCRE2_CFLAGS="-I$withval/include"
LIBPCRE2_LDFLAGS="-L$withval/lib"
AC_ARG_WITH([libpcre2-include],
AC_HELP_STRING([--with-libpcre2-include@<:@=DIR@:>@],
[use libpcre2 include headers from given path.]
LIBPCRE2_CFLAGS="-I$withval"