mirror of
https://github.com/3proxy/3proxy.git
synced 2026-03-30 18:40:10 +08:00
Detect OpenSSL / pam libraries in Makefiles
This commit is contained in:
parent
b0755ea482
commit
b76a78228f
3
.github/workflows/c-cpp.yml
vendored
3
.github/workflows/c-cpp.yml
vendored
@ -35,9 +35,6 @@ jobs:
|
||||
- name: dirs Windows
|
||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
||||
run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib/VC/x64/MT" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win && dir "c:/program files/openssl/lib"'
|
||||
- name: SSLPlugin Linux
|
||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||
run: "sed -i '/^PLUGIN/s/$/ SSLPlugin/' Makefile && sed -i '/^LIBS/s/$/ -lcrypto -lssl/' Makefile"
|
||||
- name: make
|
||||
run: make
|
||||
- name: mkdir
|
||||
|
||||
@ -29,7 +29,17 @@ AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Mak
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.FreeBSD
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin PCREPlugin PamAuth TransparentPlugin
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | cc -x c -l crypto -l ssl -o testssl - && rm testssl && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += -l crypto -l ssl
|
||||
PLUGINS += SSLPlugin
|
||||
endif
|
||||
PAM_CHECK = $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | cc -x c -l pam -o testpam - && rm testpam && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
endif
|
||||
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
|
||||
@ -36,7 +36,15 @@ MAKEFILE = Makefile.Linux
|
||||
LIBS ?= -ldl
|
||||
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||
|
||||
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | cc -x c -l crypto -l ssl -o testssl - && rm testssl && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += -l crypto -l ssl
|
||||
PLUGINS += SSLPlugin
|
||||
endif
|
||||
PAM_CHECK = $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | cc -x c -l pam -o testpam - && rm testpam && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
endif
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
|
||||
@ -20,7 +20,7 @@ LDFLAGS = -O2 -fno-strict-aliasing -pthread
|
||||
DCFLAGS = -fPIC
|
||||
DLFLAGS = -shared
|
||||
DLSUFFICS = .ld.so
|
||||
LIBS =
|
||||
LIBS ?=
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
LNOUT = -o
|
||||
@ -33,7 +33,16 @@ AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Mak
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.unix
|
||||
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin PamAuth TransparentPlugin
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | cc -x c -l crypto -l ssl -o testssl - && rm testssl && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += -l crypto -l ssl
|
||||
PLUGINS += SSLPlugin
|
||||
endif
|
||||
PAM_CHECK = $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | cc -x c -l pam -o testpam - && rm testpam && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
endif
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user