Skip to content

Commit

Permalink
merge changes from #378
Browse files Browse the repository at this point in the history
  • Loading branch information
davehorton committed Sep 23, 2024
1 parent e773785 commit b11c4e3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update \
&& mkdir /usr/local/src/drachtio-server/build \
&& cd /usr/local/src/drachtio-server/build \
&& ../configure --enable-tcmalloc=yes CPPFLAGS='-DNDEBUG' CXXFLAGS='-O2' \
&& make-j ${BUILD_CPUS} \
&& make -j ${BUILD_CPUS} \
&& make install \
&& apt-get purge -y --quiet --auto-remove gcc g++ make cmake build-essential git autoconf automake libtool libtool-bin \
&& rm -rf /var/lib/apt/* \
Expand Down
15 changes: 12 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ INCLUDES= -I${srcdir}/deps/sofia-sip/libsofia-sip-ua/su -I${srcdir}/deps/sofia-s
-I${srcdir}/deps/sofia-sip/libsofia-sip-ua/sip -I${srcdir}/deps/sofia-sip/libsofia-sip-ua/msg \
-I${srcdir}/deps/sofia-sip/libsofia-sip-ua/url -I${srcdir}/deps/sofia-sip/libsofia-sip-ua/tport \
-I${srcdir}/deps/sofia-sip/libsofia-sip-ua/bnf -I${srcdir}/deps/jansson/src \
-I${srcdir}/deps/hiredis \
-I${srcdir}/deps/prometheus-cpp/build/include -I/usr/local/include

AM_LDFLAGS= -L/usr/local/lib -L${srcdir}/deps/prometheus-cpp/build/lib
LDADD= -lboost_thread -lpthread -lssl -lcrypto -lz

if DEP_HIREDIS
INCLUDES += -I${srcdir}/deps
AM_LDFLAGS += -L${srcdir}/deps/hiredis
endif

if DEP_BOOST
INCLUDES += -I${srcdir}/deps/boost
AM_LDFLAGS += -L${srcdir}/deps/boost/stage/lib
Expand All @@ -28,7 +32,7 @@ drachtio_CPPFLAGS=-D_REENTRANT -DDRACHTIO_VERSION=\"$(MYVERSION)\" -Wno-error=de
-DBOOST_ALLOW_DEPRECATED_HEADERS -O2 -Wno-stringop-overflow
drachtio_LDADD= ${srcdir}/deps/sofia-sip/libsofia-sip-ua/.libs/libsofia-sip-ua.a \
${srcdir}/deps/jansson/src/.libs/libjansson.a \
${srcdir}/deps/hiredis/libhiredis.a -lcurl -lpthread -lssl -lcrypto -lz
-lhiredis -lcurl -lpthread -lssl -lcrypto -lz
if ! DEP_BOOST
drachtio_CPPFLAGS+=-DBOOST_LOG_DYN_LINK
endif
Expand Down Expand Up @@ -93,6 +97,10 @@ endif
BUILT_SOURCES=${srcdir}/deps/sofia-sip/libsofia-sip-ua/.libs/libsofia-sip-ua.a \
${srcdir}/deps/jansson/src/.libs/libjansson.a ${srcdir}/deps/prometheus-cpp/build/lib/libprometheus-cpp-core.a

if DEP_HIREDIS
BUILT_SOURCES += ${srcdir}/deps/hiredis/libhiredis.a
endif

if DEP_BOOST
BUILT_SOURCES += ${srcdir}/deps/boost/stage/lib/libboost_thread.a
endif
Expand All @@ -118,6 +126,7 @@ ${srcdir}/deps/prometheus-cpp/build/lib/libprometheus-cpp-core.a ${srcdir}/deps/
cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=`pwd` && \
$(MAKE) && make install

if DEP_HIREDIS
${srcdir}/deps/hiredis/libhiredis.a:
cd ${srcdir}/deps/hiredis && cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_SSL=ON . && $(MAKE)

endif
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AX_CXX_COMPILE_STDCXX_11()
AX_CXX_COMPILE_STDCXX_17(noext, optional)

AM_CONDITIONAL([DEP_BOOST], [test -d "${srcdir}/deps/boost/libs"])
AM_CONDITIONAL([DEP_HIREDIS], [test -d "${srcdir}/deps/hiredis/CMakeLists.txt"])

AM_CONDITIONAL(OSX, false)
AM_CONDITIONAL(LINUX, false)
Expand Down
2 changes: 1 addition & 1 deletion src/blacklist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ THE SOFTWARE.
#include <boost/variant.hpp>
#include <regex>

#include "hiredis.h"
#include <hiredis/hiredis.h>

#include "blacklist.hpp"
#include "controller.hpp"
Expand Down

0 comments on commit b11c4e3

Please sign in to comment.