diff --git a/makefile b/makefile index 8f2f6221..d5e2c50f 100644 --- a/makefile +++ b/makefile @@ -453,11 +453,11 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) endif endif # Find available RegEx library. Prefer libpcreposix. - ifneq (,$(call find_include,pcreposix)) - ifneq (,$(call find_lib,pcreposix)) + ifneq (,$(and $(call find_include,pcreposix),$(call find_include,pcre))) + ifneq (,$(and $(call find_lib,pcreposix),$(call find_lib,pcre))) OS_CCDEFS += -DHAVE_PCREPOSIX_H - OS_LDFLAGS += -lpcreposix - $(info using libpcreposix: $(call find_lib,pcreposix) $(call find_include,pcreposix)) + OS_LDFLAGS += -lpcreposix -lpcre + $(info using libpcreposix: $(call find_lib,pcreposix) $(call find_lib,pcre) $(call find_include,pcreposix) $(call find_include,pcre)) ifeq ($(LD_SEARCH_NEEDED),$(call need_search,pcreposix)) OS_LDFLAGS += -L$(dir $(call find_lib,pcreposix)) endif diff --git a/scp.c b/scp.c index 70ef09b1..0db51833 100644 --- a/scp.c +++ b/scp.c @@ -5206,7 +5206,7 @@ if (flag) { fprintf (st, "\n %s", sim_toffset_64 ? "Large File (>2GB) support" : "No Large File support"); fprintf (st, "\n SDL Video support: %s", vid_version()); #if defined (HAVE_PCREPOSIX_H) - fprintf (st, "\n PCRE RegEx support for EXPECT commands"); + fprintf (st, "\n PCRE RegEx (Version %s) support for EXPECT commands", pcre_version()); #elif defined (HAVE_REGEX_H) fprintf (st, "\n RegEx support for EXPECT commands"); #else diff --git a/sim_defs.h b/sim_defs.h index a51cb7b2..cd04481c 100644 --- a/sim_defs.h +++ b/sim_defs.h @@ -140,6 +140,7 @@ extern int sim_vax_snprintf(char *buf, size_t buf_size, const char *fmt, ...); #endif #if defined(HAVE_PCREPOSIX_H) #include +#include #define USE_REGEX 1 #elif defined(HAVE_REGEX_H) #include