-# Get the 8.x PCRE library from https://ftp.pcre.org/pub/pcre/
-inc="/source/pcre-8.45/"
-lib="/source/pcre-8.45/.libs"
+# Get the 8.x PCRE library from
+# https://sourceforge.net/projects/pcre/files/pcre/
+# Get the 10.x PCRE2 library from
+# https://github.com/PCRE2Project/pcre2/releases
+#
+#
+usepcre2=yes
+#
+#
+if [ "$usepcre2" = "yes" ]; then
+ PCREOPT=""
+ inc="/source/pcre2-10.42/src/"
+ # need pcre2.h
+ lib="/source/pcre2-10.42/.libs"
+ # need libpcre2-8.a & libpcre2-posix.a
+else
+ PCREOPT="--disable-pcre2"
+ inc="/source/pcre-8.45/"
+ lib="/source/pcre-8.45/.libs"
+fi