X-Git-Url: https://git.distorted.org.uk/~mdw/anag/blobdiff_plain/0279756ef8eb60878927c9e325a9ad25a4b0f150..650bb9da7cf5b677960c03e0a6a5616d48340845:/Makefile.am diff --git a/Makefile.am b/Makefile.am index 6374697..29e19b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,6 +30,15 @@ SUFFIXES = bin_PROGRAMS = bin_SCRIPTS = +LDADD = +if HAVE_PCRE2 + LDADD += $(PCRE2_LIBS) +else +if HAVE_PCRE + LDADD += $(PCRE_LIBS) +endif +endif + ###-------------------------------------------------------------------------- ### Making substitutions. @@ -54,8 +63,16 @@ anag_SOURCES = anag.c anag.h util.c anag_SOURCES += anagram.c anag_SOURCES += longest.c anag_SOURCES += mono.c -anag_SOURCES += pcre.c -anag_SOURCES += regexp.c +if HAVE_PCRE2 + anag_SOURCES += pcre.c +else +if HAVE_PCRE + anag_SOURCES += pcre.c +endif +endif +if HAVE_REGCOMP + anag_SOURCES += regexp.c +endif anag_SOURCES += trackword.c anag_SOURCES += wildcard.c