Signed-off-by: Lin Ma <lma(a)suse.com>
---
m4/guestfs-libraries.m4 | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
index 88d4f1cde..647bea9ec 100644
--- a/m4/guestfs-libraries.m4
+++ b/m4/guestfs-libraries.m4
@@ -238,7 +238,14 @@ AC_ARG_ENABLE([packet-dump],[
[])
dnl Check for PCRE (required)
-PKG_CHECK_MODULES([PCRE], [libpcre])
+PKG_CHECK_MODULES([PCRE], [libpcre], [], [
+ AC_CHECK_PROGS([PCRE_CONFIG], [pcre-config pcre2-config], [no])
+ AS_IF([test "x$PCRE_CONFIG" = "xno"], [
+ AC_MSG_ERROR([Please install the pcre devel package])
+ ])
+ PCRE_CFLAGS=`$PCRE_CONFIG --cflags`
+ PCRE_LIBS=`$PCRE_CONFIG --libs`
+])
dnl Check for Augeas >= 1.0.0 (required).
PKG_CHECK_MODULES([AUGEAS],[augeas >= 1.0.0])
--
2.15.1