summaryrefslogtreecommitdiff
path: root/src/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grep.c')
-rw-r--r--src/grep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/grep.c b/src/grep.c
index 7547b641..bd776e8b 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -29,6 +29,11 @@
#include <stdio.h>
#include "system.h"
+#if HAVE_LIBPCRE
+# define PCRE2_CODE_UNIT_WIDTH 8
+# include <pcre2.h>
+#endif
+
#include "argmatch.h"
#include "c-ctype.h"
#include "c-stack.h"
@@ -2830,6 +2835,12 @@ main (int argc, char **argv)
(char *) NULL);
puts (_("Written by Mike Haertel and others; see\n"
"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."));
+#if HAVE_LIBPCRE
+ unsigned char buf[128];
+ (void) pcre2_config (PCRE2_CONFIG_VERSION, buf);
+ fputs (_("\nBuilt with PCRE "), stdout);
+ puts ((char *) buf);
+#endif
return EXIT_SUCCESS;
}