Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergey Simonenko <sergey.simonenko@zabbix.com>2022-01-18 18:28:28 +0300
committerSergey Simonenko <sergey.simonenko@zabbix.com>2022-01-18 18:28:28 +0300
commit6ccac7c2c0ad102a11fde31b3ece0f2215332d11 (patch)
tree514c0507b6ec70a85382e69440380ca4683800f5 /build
parent11291e26107207a1b91e598b16584adb7b5dbe12 (diff)
...GI..... [ZBX-20444] fixed Agent 2 compilation with libpcre2 on Windows
Diffstat (limited to 'build')
-rw-r--r--build/mingw/Makefile11
-rw-r--r--build/win32/include/config.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/build/mingw/Makefile b/build/mingw/Makefile
index 8e08f499747..863565b4e8a 100644
--- a/build/mingw/Makefile
+++ b/build/mingw/Makefile
@@ -76,8 +76,15 @@ ifneq ("$(OPENSSL)", "")
endif
ifneq ("$(PCRE)", "")
- CFLAGS := $(CFLAGS) -I$(PCRE)\include
+ CFLAGS := $(CFLAGS) -DPCRE_STATIC -I$(PCRE)\include -DHAVE_PCRE_H=1
LDFLAGS := $(LDFLAGS) -L$(PCRE)\lib
+ TAGS := $(TAGS) pcre
+endif
+
+ifneq ("$(PCRE2)", "")
+ CFLAGS := $(CFLAGS) -DPCRE2_STATIC -I$(PCRE2)\include -DHAVE_PCRE2_H=1
+ LDFLAGS := $(LDFLAGS) -L$(PCRE2)\lib
+ TAGS := $(TAGS) pcre2
endif
CGO_CFLAGS += $(CFLAGS)
@@ -162,7 +169,7 @@ $(OUTPUTDIR)\algodefs.o: $(TOPDIR)\src\libs\zbxalgo\algodefs.c
$(CC) $(CFLAGS) -DUNICODE -c $^ -o $@
$(OUTPUTDIR)\zbxregexp.o: $(TOPDIR)\src\libs\zbxregexp\zbxregexp.c
- $(CC) $(CFLAGS) -DUNICODE -DPCRE_STATIC -c $^ -o $@
+ $(CC) $(CFLAGS) -DUNICODE -c $^ -o $@
$(OUTPUTDIR)\persistent_state.o: $(TOPDIR)\src\zabbix_agent\logfiles\persistent_state.c
$(CC) $(CFLAGS) -DUNICODE -c $^ -o $@
diff --git a/build/win32/include/config.h b/build/win32/include/config.h
index c26f958d89b..8eee7dfea1d 100644
--- a/build/win32/include/config.h
+++ b/build/win32/include/config.h
@@ -76,8 +76,5 @@
/* define to 1 if you have the <errno.h> header file */
#define HAVE_ERRNO_H 1
-/* Define to 1 if you have the <pcre.h> header file. */
-#define HAVE_PCRE_H 1
-
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1