mirror of
https://github.com/3proxy/3proxy.git
synced 2026-03-31 02:40:13 +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
|
- name: dirs Windows
|
||||||
if: ${{ startsWith(matrix.target, '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"'
|
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
|
- name: make
|
||||||
run: make
|
run: make
|
||||||
- name: mkdir
|
- name: mkdir
|
||||||
|
|||||||
@ -29,7 +29,17 @@ AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Mak
|
|||||||
TYPECOMMAND = cat
|
TYPECOMMAND = cat
|
||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
MAKEFILE = Makefile.FreeBSD
|
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
|
include Makefile.inc
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,15 @@ MAKEFILE = Makefile.Linux
|
|||||||
LIBS ?= -ldl
|
LIBS ?= -ldl
|
||||||
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
|
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
|
||||||
PLUGINS ?= StringsPlugin TrafficPlugin PCREPlugin 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
|
include Makefile.inc
|
||||||
|
|
||||||
allplugins:
|
allplugins:
|
||||||
|
|||||||
@ -20,7 +20,7 @@ LDFLAGS = -O2 -fno-strict-aliasing -pthread
|
|||||||
DCFLAGS = -fPIC
|
DCFLAGS = -fPIC
|
||||||
DLFLAGS = -shared
|
DLFLAGS = -shared
|
||||||
DLSUFFICS = .ld.so
|
DLSUFFICS = .ld.so
|
||||||
LIBS =
|
LIBS ?=
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
LIBSSUFFIX =
|
LIBSSUFFIX =
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
@ -33,7 +33,16 @@ AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Mak
|
|||||||
TYPECOMMAND = cat
|
TYPECOMMAND = cat
|
||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
MAKEFILE = Makefile.unix
|
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
|
include Makefile.inc
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user