From 1f92847a634a9bc629dd18d3baa3eff5f1177a22 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Thu, 2 Apr 2026 13:47:27 +0300 Subject: [PATCH] Library checks compatible with different make versions (fix Ubuntu 18) --- Makefile.FreeBSD | 6 +++--- Makefile.Linux | 6 +++--- Makefile.openwrt-mips | 6 +++--- Makefile.unix | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile.FreeBSD b/Makefile.FreeBSD index fc1ccc1..693d5f8 100644 --- a/Makefile.FreeBSD +++ b/Makefile.FreeBSD @@ -30,16 +30,16 @@ TYPECOMMAND = cat COMPATLIBS = MAKEFILE = Makefile.FreeBSD PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin -OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) +OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif -PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) +PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) ifeq ($(PAM_CHECK), true) PLUGINS += PamAuth endif -PCRE_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) +PCRE_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) ifeq ($(PCRE_CHECK), true) PLUGINS += PCREPlugin endif diff --git a/Makefile.Linux b/Makefile.Linux index 42f339b..db63281 100644 --- a/Makefile.Linux +++ b/Makefile.Linux @@ -36,16 +36,16 @@ MAKEFILE = Makefile.Linux LIBS ?= -ldl #PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin -OPENSSL_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) +OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif -PCRE_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) +PCRE_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) ifeq ($(PCRE_CHECK), true) PLUGINS += PCREPlugin endif -PAM_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) +PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) ifeq ($(PAM_CHECK), true) PLUGINS += PamAuth endif diff --git a/Makefile.openwrt-mips b/Makefile.openwrt-mips index 3d79f4b..6ea07f5 100644 --- a/Makefile.openwrt-mips +++ b/Makefile.openwrt-mips @@ -36,16 +36,16 @@ MAKEFILE = Makefile.openwrt-mips LIBS ?= -ldl #PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin -OPENSSL_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) +OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif -PCRE_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) +PCRE_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) ifeq ($(PCRE_CHECK), true) PLUGINS += PCREPlugin endif -PAM_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) +PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) ifeq ($(PAM_CHECK), true) PLUGINS += PamAuth endif diff --git a/Makefile.unix b/Makefile.unix index 4db7e11..c8151cc 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -34,16 +34,16 @@ TYPECOMMAND = cat COMPATLIBS = MAKEFILE = Makefile.unix PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin -OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) +OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif -PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) +PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) ifeq ($(PAM_CHECK), true) PLUGINS += PamAuth endif -PCRE_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) +PCRE_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) ifeq ($(PCRE_CHECK), true) PLUGINS += PCREPlugin endif