Commit 780a9d57 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

build: cleanup

Remove unused build options, flags and defines

Change-Id: I0c25511ade66025427ca0411cf34cfdd73a4bd1f
parent eff973bd
...@@ -499,30 +499,6 @@ AS_IF([test "x$enable_video" != "xno" -a "x$enable_accel" != "xno"], [ ...@@ -499,30 +499,6 @@ AS_IF([test "x$enable_video" != "xno" -a "x$enable_accel" != "xno"], [
PKG_CHECK_MODULES(AVUTIL, libavutil >= 55.75.100, [ PKG_CHECK_MODULES(AVUTIL, libavutil >= 55.75.100, [
ring_accel="yes" ring_accel="yes"
AC_DEFINE([RING_ACCEL], [1], [Hardware acceleration is enabled]) AC_DEFINE([RING_ACCEL], [1], [Hardware acceleration is enabled])
AS_IF([test "${SYS}" = "linux" && test -z "${HAVE_ANDROID_FALSE}"], [
dnl ffmpeg's vaapi and vdpau implementations depend on x11
PKG_CHECK_MODULES([X11], [x11], [x11_available="yes"], [x11_available="no"])
AS_IF([test "${x11_available}" = "yes"], [
PKG_CHECK_MODULES([LIBVA], [libva], [
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm], [
AC_DEFINE([HAVE_VAAPI_ACCEL_DRM], [1], [Defined if vaapi via DRM is available])
], [])
PKG_CHECK_MODULES([LIBVA_X11], [libva-x11], [
AC_DEFINE([HAVE_VAAPI_ACCEL_X11], [1], [Defined if vaapi via X11 is available])
], [])
AC_CHECK_HEADERS([libavcodec/vaapi.h], [
ring_vaapi="yes"
AC_DEFINE([RING_VAAPI], [1], [Defined if vaapi is available])
])
], [])
PKG_CHECK_MODULES([VDPAU], [vdpau], [
AC_CHECK_HEADERS([libavcodec/vdpau.h], [
ring_vdpau="yes"
AC_DEFINE([RING_VDPAU], [1], [Defined if vdpau is available])
])
], [])
])
])
AS_IF([test "${SYS}" = "darwin"], [ AS_IF([test "${SYS}" = "darwin"], [
AC_CHECK_HEADER([VideoToolbox/VideoToolbox.h], [ AC_CHECK_HEADER([VideoToolbox/VideoToolbox.h], [
AC_CHECK_HEADER([libavcodec/videotoolbox.h], [ AC_CHECK_HEADER([libavcodec/videotoolbox.h], [
...@@ -531,15 +507,12 @@ AS_IF([test "x$enable_video" != "xno" -a "x$enable_accel" != "xno"], [ ...@@ -531,15 +507,12 @@ AS_IF([test "x$enable_video" != "xno" -a "x$enable_accel" != "xno"], [
]) ])
]) ])
]) ])
],[AC_MSG_NOTICE([HWAccel API not found])]) ],[])
]) ])
AM_CONDITIONAL([RING_ACCEL], [test "x${ring_accel}" = "xyes"]) AM_CONDITIONAL([RING_ACCEL], [test "x${ring_accel}" = "xyes"])
AM_CONDITIONAL([RING_VAAPI], [test "x${ring_vaapi}" = "xyes"])
AM_CONDITIONAL([RING_VDPAU], [test "x${ring_vdpau}" = "xyes"])
AM_CONDITIONAL([ENABLE_VIDEOTOOLBOX], [test "x${ring_vt}" = "xyes"])
dnl check for GnuTLS dnl check for GnuTLS
PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.4.14], [HAVE_GNUTLS=1], [HAVE_GNUTLS=0]) PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.5.17], [HAVE_GNUTLS=1], [HAVE_GNUTLS=0])
# PTHREAD # PTHREAD
# required dependency(ies): libxpat # required dependency(ies): libxpat
...@@ -574,30 +547,14 @@ AC_ARG_WITH([speexdsp], ...@@ -574,30 +547,14 @@ AC_ARG_WITH([speexdsp],
[with_speexdsp=yes]) [with_speexdsp=yes])
AS_IF([test "x$with_speexdsp" != xno], [PKG_CHECK_MODULES([SPEEXDSP], [speexdsp])]) AS_IF([test "x$with_speexdsp" != xno], [PKG_CHECK_MODULES([SPEEXDSP], [speexdsp])])
AC_DEFINE_UNQUOTED([HAVE_SPEEXDSP], `if test "x$with_speexdsp" = "xyes"; then echo 1; else echo 0; fi`, [Define if you have libspeexdsp]) AC_DEFINE_UNQUOTED([HAVE_SPEEXDSP], `if test "x$with_speexdsp" = "xyes"; then echo 1; else echo 0; fi`, [Define if you have libspeexdsp])
AM_CONDITIONAL(BUILD_SPEEXDSP, test "x$with_speexdsp" = "xyes" ) AM_CONDITIONAL(BUILD_SPEEXDSP, test "x$with_speexdsp" = "xyes" )
dnl opus is enabled if it's installed
AC_ARG_WITH([opus],
[AS_HELP_STRING([--with-opus], [support opus audio @<:@default=check@:>@])], [], [with_opus=check])
AS_CASE(["$with_opus"],
[yes], [PKG_CHECK_MODULES([opus], [opus], [HAVE_OPUS=1])],
[no], [HAVE_OPUS=0],
[PKG_CHECK_MODULES([opus], [opus], [HAVE_OPUS=1], [HAVE_OPUS=0])])
AM_CONDITIONAL([BUILD_OPUS], [test "$HAVE_OPUS" -eq 1])
dnl check for openDHT dnl check for openDHT
PKG_CHECK_MODULES([OPENDHT], [opendht >= 0.6.1],, AC_MSG_WARN([Missing OpenDHT])) PKG_CHECK_MODULES([OPENDHT], [opendht >= 0.6.1],, AC_MSG_WARN([Missing OpenDHT]))
PKG_CHECK_MODULES([SECP256K1], [libsecp256k1 >= 0.1],, AC_MSG_FAILURE([Missing secp256k1])) PKG_CHECK_MODULES([SECP256K1], [libsecp256k1 >= 0.1],, AC_MSG_FAILURE([Missing secp256k1]))
dnl IPv6 mode is default-disabled
AC_ARG_ENABLE([ipv6], AS_HELP_STRING([--enable-ipv6], [Enable IPv6 support]))
AC_DEFINE_UNQUOTED([HAVE_IPV6], `if test "x$enable_ipv6" = "xyes"; then echo 1; else echo 0; fi`, [Define if you have IPv6])
AM_CONDITIONAL(BUILD_IPV6, test "x$enable_ipv6" = "xyes" )
# LIBUPNP # LIBUPNP
dnl check for libupnp dnl check for libupnp
AC_ARG_WITH([upnp], [AS_HELP_STRING([--without-upnp], AC_ARG_WITH([upnp], [AS_HELP_STRING([--without-upnp],
......
...@@ -119,22 +119,9 @@ ip_utils::haveCommonAddr(const std::vector<IpAddr>& a, const std::vector<IpAddr> ...@@ -119,22 +119,9 @@ ip_utils::haveCommonAddr(const std::vector<IpAddr>& a, const std::vector<IpAddr>
return false; return false;
} }
IpAddr
ip_utils::getAnyHostAddr(pj_uint16_t family)
{
if (family == pj_AF_UNSPEC()) {
family = pj_AF_INET6();
}
return IpAddr(family);
}
IpAddr IpAddr
ip_utils::getLocalAddr(pj_uint16_t family) ip_utils::getLocalAddr(pj_uint16_t family)
{ {
sip_utils::register_thread();
if (family == pj_AF_UNSPEC()) {
family = pj_AF_INET6();
}
IpAddr ip_addr {}; IpAddr ip_addr {};
pj_status_t status = pj_gethostip(family, ip_addr.pjPtr()); pj_status_t status = pj_gethostip(family, ip_addr.pjPtr());
if (status == PJ_SUCCESS) { if (status == PJ_SUCCESS) {
......
...@@ -274,7 +274,7 @@ std::string getDeviceName(); ...@@ -274,7 +274,7 @@ std::string getDeviceName();
* Return the generic "any host" IP address of the specified family. * Return the generic "any host" IP address of the specified family.
* If family is unspecified, default to pj_AF_INET6() (IPv6). * If family is unspecified, default to pj_AF_INET6() (IPv6).
*/ */
IpAddr getAnyHostAddr(pj_uint16_t family = pj_AF_UNSPEC()); inline IpAddr getAnyHostAddr(pj_uint16_t family) { return IpAddr(family); }
/** /**
* Return the first host IP address of the specified family. * Return the first host IP address of the specified family.
...@@ -286,7 +286,7 @@ IpAddr getAnyHostAddr(pj_uint16_t family = pj_AF_UNSPEC()); ...@@ -286,7 +286,7 @@ IpAddr getAnyHostAddr(pj_uint16_t family = pj_AF_UNSPEC());
* If family is unspecified, default to pj_AF_INET6() if compiled * If family is unspecified, default to pj_AF_INET6() if compiled
* with IPv6, or pj_AF_INET() otherwise. * with IPv6, or pj_AF_INET() otherwise.
*/ */
IpAddr getLocalAddr(pj_uint16_t family = pj_AF_UNSPEC()); IpAddr getLocalAddr(pj_uint16_t family);
/** /**
* Get the IP address of the network interface interface with the specified * Get the IP address of the network interface interface with the specified
......
...@@ -7,7 +7,7 @@ libv4l2_la_SOURCES = \ ...@@ -7,7 +7,7 @@ libv4l2_la_SOURCES = \
video_device_monitor_impl.cpp video_device_monitor_impl.cpp
AM_CXXFLAGS = @LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@ @LIBAVUTIL_CFLAGS@ AM_CXXFLAGS = @LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@ @LIBAVUTIL_CFLAGS@
AM_CXXFLAGS += @UDEV_CFLAGS@ @VDPAU_CFLAGS@ @LIBVA_CFLAGS@ @LIBVA_DRM_CFLAGS@ @LIBVA_X11_CFLAGS@ AM_CXXFLAGS += @UDEV_CFLAGS@
libv4l2_la_LIBADD = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@ @LIBAVDEVICE_LIBS@ @LIBSWSCALE_LIBS@ @LIBAVUTIL_LIBS@ libv4l2_la_LIBADD = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@ @LIBAVDEVICE_LIBS@ @LIBSWSCALE_LIBS@ @LIBAVUTIL_LIBS@
libv4l2_la_LIBADD += @UDEV_LIBS@ @X11_LIBS@ @VDPAU_LIBS@ @LIBVA_LIBS@ @LIBVA_DRM_LIBS@ @LIBVA_X11_LIBS@ libv4l2_la_LIBADD += @UDEV_LIBS@
...@@ -534,9 +534,6 @@ SIPVoIPLink::SIPVoIPLink() : pool_(nullptr, pj_pool_release) ...@@ -534,9 +534,6 @@ SIPVoIPLink::SIPVoIPLink() : pool_(nullptr, pj_pool_release)
if (status != PJ_SUCCESS) if (status != PJ_SUCCESS)
JAMI_ERR("Can't set transport callback: %s", sip_utils::sip_strerror(status).c_str()); JAMI_ERR("Can't set transport callback: %s", sip_utils::sip_strerror(status).c_str());
if (!ip_utils::getLocalAddr())
throw VoipLinkException("UserAgent: Unable to determine network capabilities");
TRY(pjsip_tsx_layer_init_module(endpt_)); TRY(pjsip_tsx_layer_init_module(endpt_));
TRY(pjsip_ua_init_module(endpt_, nullptr)); TRY(pjsip_ua_init_module(endpt_, nullptr));
TRY(pjsip_replaces_init_module(endpt_)); // See the Replaces specification in RFC 3891 TRY(pjsip_replaces_init_module(endpt_)); // See the Replaces specification in RFC 3891
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment