Skip to content

Commit 403963e

Browse files
committed
Check that srtp2 has been detected.
Throw in -latomic when linking both module and librtpproxy.
1 parent 66b85cb commit 403963e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

python/build_rtpproxy.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ then
6060
if [ "${ARCH}" = "i386" ]
6161
then
6262
OPENSSL_CONFIGURE_ARGS="linux-x86"
63+
if [ -z "${SRTP_LIBS}" ]
64+
then
65+
export LIB_CRYPTO_STATIC="-l:libcrypto.a -lpthread -latomic"
66+
else
67+
export LIB_CRYPTO_STATIC="-l:libcrypto.a -lpthread ${SRTP_LIBS}"
68+
fi
6369
fi
6470
fi
6571

@@ -109,6 +115,11 @@ fi
109115

110116
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure --enable-static-crypto \
111117
--enable-librtpproxy --enable-lto --disable-noinst --disable-debug
118+
if ! grep -q '^#define ENABLE_SRTP2 1' src/config.h
119+
then
120+
grep -C 200 lsrtp2 config.log
121+
exit 1
122+
fi
112123
for dir in libexecinfo libucl libre external/libelperiodic/src libxxHash modules
113124
do
114125
make -C ${dir} all

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def main():
4343
'-Lbuild/lib',
4444
'-l:libsrtp2.a', '-l:libssl.a', '-l:libcrypto.a',
4545
])
46+
if 'SRTP_LIBS' in environ:
47+
link_args.extend(environ['SRTP_LIBS'].split())
4648
ext_modules = [
4749
Extension(
4850
'rtp.io',

0 commit comments

Comments
 (0)