Skip to content

Commit

Permalink
Added check for OpenSSL version 3.0 in make file.
Browse files Browse the repository at this point in the history
  • Loading branch information
yashwantsahu20 committed Nov 13, 2024
1 parent becc5b3 commit 1fe7744
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif
STDCPP := -std=c++$(shell echo $(CPLUSPLUS) | cut -c3-4) -DCXX$(shell echo $(CPLUSPLUS) | cut -c3-4)


targets := libconfig libdaemon jemalloc mariadb_client re2 sqlite3 pcre lz4 cityhash microhttpd curl ev libhttpserver libinjection prometheus-cpp postgresql libusual libscram
targets := check_openssl_version libconfig libdaemon jemalloc mariadb_client re2 sqlite3 pcre lz4 cityhash microhttpd curl ev libhttpserver libinjection prometheus-cpp postgresql libusual libscram
ifeq ($(SYS_KERN),Linux)
targets += coredumper
endif
Expand Down Expand Up @@ -87,6 +87,17 @@ else
$(error Warning: OpenSSL headers not found. exiting, please install openssl.)
endif

OPENSSL_VERSION_3 = 3.0.0

check_openssl_version:
@current_version=$$(openssl version | awk '{print $$2}'); \
echo "Installed OpenSSL version: $$current_version"; \
compare_result=`printf "%s\n%s" "$(OPENSSL_VERSION_3)" "$$current_version" | sort -V | head -n 1`; \
if [ "$$compare_result" != "$(OPENSSL_VERSION_3)" ]; then \
echo "Error: Installed OpenSSL version must be $(OPENSSL_VERSION_3) or higher, Please upgrade OpenSSL."; \
exit 1; \
fi

libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a re2/re2/obj/libre2.a
cd libhttpserver && rm -rf libhttpserver-*/ || true
cd libhttpserver && tar -zxf libhttpserver-*.tar.gz
Expand Down

0 comments on commit 1fe7744

Please sign in to comment.