diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 78253bf..b6f24ed 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -28,13 +28,16 @@ jobs: run: ln -s Makefile.Linux Makefile - name: Linux libraries if: ${{ startsWith(matrix.target, 'ubuntu') }} - run: sudo apt install libssl-dev libpam-dev + run: sudo apt install libssl-dev libpam-dev libpcre3 libpcre3-dev + - name: Mac libraries + if: ${{ startsWith(matrix.target, 'macos') }} + run: brew install pcre - name: ln Mac if: ${{ startsWith(matrix.target, 'macos') }} run: ln -s Makefile.FreeBSD Makefile - name: Mac variables if: ${{ startsWith(matrix.target, 'macos') }} - run: echo "LDFLAGS=-L/usr/local/opt/openssl/lib -L/opt/homebrew/opt/openssl/lib" >> $GITHUB_ENV && echo "CFLAGS=-I/usr/local/opt/openssl/include -I/opt/homebrew/opt/openssl/include" >> $GITHUB_ENV + run: echo "LDFLAGS=-L/usr/local/lib -L/opt/homebrew/lib -L/usr/local/opt/openssl/lib -L/opt/homebrew/opt/openssl/lib" >> $GITHUB_ENV && echo "CFLAGS=-I/usr/local/include -I/opt/homebrew/include -I/usr/local/opt/openssl/include -I/opt/homebrew/opt/openssl/include" >> $GITHUB_ENV - name: ln Windows if: ${{ startsWith(matrix.target, 'windows') }} run: copy Makefile.win Makefile diff --git a/Makefile.FreeBSD b/Makefile.FreeBSD index 50453f9..e42714a 100644 --- a/Makefile.FreeBSD +++ b/Makefile.FreeBSD @@ -40,7 +40,7 @@ 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) -ifeq ($(OPENSSL_CHECK), true) +ifeq ($(PCRE_CHECK), true) PLUGINS += PCREPlugin endif diff --git a/Makefile.Linux b/Makefile.Linux index e3daa23..d831f6a 100644 --- a/Makefile.Linux +++ b/Makefile.Linux @@ -42,7 +42,7 @@ ifeq ($(OPENSSL_CHECK), true) 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) -ifeq ($(OPENSSL_CHECK), true) +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) diff --git a/Makefile.openwrt-mips b/Makefile.openwrt-mips index 48d3cb9..3d79f4b 100644 --- a/Makefile.openwrt-mips +++ b/Makefile.openwrt-mips @@ -42,7 +42,7 @@ ifeq ($(OPENSSL_CHECK), true) 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) -ifeq ($(OPENSSL_CHECK), true) +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) diff --git a/Makefile.unix b/Makefile.unix index bbb93ea..ef4d671 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -44,7 +44,7 @@ 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) -ifeq ($(OPENSSL_CHECK), true) +ifeq ($(PCRE_CHECK), true) PLUGINS += PCREPlugin endif include Makefile.inc