pcre.c, etc.: Support the PCRE2 library.
[anag] / Makefile.am
index 9425a68..29e19b3 100644 (file)
@@ -31,9 +31,13 @@ bin_PROGRAMS          =
 bin_SCRIPTS             =
 
 LDADD                   =
+if HAVE_PCRE2
+  LDADD                        += $(PCRE2_LIBS)
+else
 if HAVE_PCRE
   LDADD                        += $(PCRE_LIBS)
 endif
+endif
 
 ###--------------------------------------------------------------------------
 ### Making substitutions.
@@ -59,8 +63,12 @@ anag_SOURCES          = anag.c anag.h util.c
 anag_SOURCES           += anagram.c
 anag_SOURCES           += longest.c
 anag_SOURCES           += mono.c
-if HAVE_PCRE
+if HAVE_PCRE2
   anag_SOURCES         += pcre.c
+else
+if HAVE_PCRE
+    anag_SOURCES       += pcre.c
+endif
 endif
 if HAVE_REGCOMP
   anag_SOURCES         += regexp.c