-
Do not unnecessarily clutter CPPFLAGS; the variable is honored by Autoconf while running its conftests and can cause issues such as symbol clashes between the libnatpmp and webrtc-audio-processing library observed below: configure:20851: checking for initnatpmp in -lnatpmp configure:20873: g++ -std=gnu++17 -o conftest -DNDEBUG=1 -O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPJ_AUTOCONF=1 -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include -fvisibility=hidden -DDRING_BUILD -Ddring_EXPORTS -DASIO_STANDALONE -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include -I/gnu/store/zimpk6gqmjrwxc7fnam212kv3a6dwpzz-jsoncpp-1.9.2/include -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DWEBRTC_POSIX -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include/webrtc_audio_processing -Wl,-Bsymbolic -ldl -L/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib -L/gnu/store/zimpk6gqmjrwxc7fnam212kv3a6dwpzz-jsoncpp-1.9.2/lib -ljsoncpp -L/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib -lwebrtc_audio_processing conftest.cpp -lnatpmp -lpthread -lssl -lcrypto >&5 ld: /tmp/cc5prP4w.o: in function `main': conftest.cpp:(.text.startup+0x0): multiple definition of `main'; /home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib/libwebrtc_audio_processing.a(libwebrtc_audio_processing_la-click_annotate.o):click_annotate.cc:(.text.startup+0x0): first defined here collect2: error: ld returned 1 exit status configure:20873: $? = 1 This was causing the link test of the libnatpmp library to fail, which in turned caused the natpmp support to be disabled entirely. * src/Makefile.am (libring_la_LDFLAGS): Add @WEBRTC_LIBS@. (libring_la_CFLAGS): Add @WEBRTC_CFLAGS@. * src/media/audio/Makefile.am (libaudio_la_CXXFLAGS) [HAVE_WEBRTC_AP]: Add @WEBRTC_CFLAGS@. * src/media/audio/echo-cancel/Makefile.am (libecho_cancel_la_CXXFLAGS): Add @WEBRTC_CFLAGS@ and honor AM_CXXFLAGS. GitLab: #487 Change-Id: I064d6a563318b34b2f3f516ca2aa8c2831205b09
Do not unnecessarily clutter CPPFLAGS; the variable is honored by Autoconf while running its conftests and can cause issues such as symbol clashes between the libnatpmp and webrtc-audio-processing library observed below: configure:20851: checking for initnatpmp in -lnatpmp configure:20873: g++ -std=gnu++17 -o conftest -DNDEBUG=1 -O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPJ_AUTOCONF=1 -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include -fvisibility=hidden -DDRING_BUILD -Ddring_EXPORTS -DASIO_STANDALONE -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include -I/gnu/store/zimpk6gqmjrwxc7fnam212kv3a6dwpzz-jsoncpp-1.9.2/include -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DWEBRTC_POSIX -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include/webrtc_audio_processing -Wl,-Bsymbolic -ldl -L/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib -L/gnu/store/zimpk6gqmjrwxc7fnam212kv3a6dwpzz-jsoncpp-1.9.2/lib -ljsoncpp -L/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib -lwebrtc_audio_processing conftest.cpp -lnatpmp -lpthread -lssl -lcrypto >&5 ld: /tmp/cc5prP4w.o: in function `main': conftest.cpp:(.text.startup+0x0): multiple definition of `main'; /home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib/libwebrtc_audio_processing.a(libwebrtc_audio_processing_la-click_annotate.o):click_annotate.cc:(.text.startup+0x0): first defined here collect2: error: ld returned 1 exit status configure:20873: $? = 1 This was causing the link test of the libnatpmp library to fail, which in turned caused the natpmp support to be disabled entirely. * src/Makefile.am (libring_la_LDFLAGS): Add @WEBRTC_LIBS@. (libring_la_CFLAGS): Add @WEBRTC_CFLAGS@. * src/media/audio/Makefile.am (libaudio_la_CXXFLAGS) [HAVE_WEBRTC_AP]: Add @WEBRTC_CFLAGS@. * src/media/audio/echo-cancel/Makefile.am (libecho_cancel_la_CXXFLAGS): Add @WEBRTC_CFLAGS@ and honor AM_CXXFLAGS. GitLab: #487 Change-Id: I064d6a563318b34b2f3f516ca2aa8c2831205b09
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile.am 3.84 KiB
include ../globals.mk
ENABLE_PLUGIN_LIBS=
if ENABLE_PLUGIN
ENABLE_PLUGIN_LIBS+=./plugin/libplugin.la
endif
ENABLE_VIDEO_LIBS=
if ENABLE_VIDEO
ENABLE_VIDEO_LIBS+=./media/video/libvideo.la
if HAVE_LINUX
if HAVE_ANDROID
ENABLE_VIDEO_LIBS+= \
./media/video/androidvideo/libandroidvideo.la
else
ENABLE_VIDEO_LIBS+= \
./media/video/v4l2/libv4l2.la
endif
endif
if HAVE_OSX
ENABLE_VIDEO_LIBS+= \
./media/video/osxvideo/libosxvideo.la
endif
if HAVE_IOS
ENABLE_VIDEO_LIBS+= \
./media/video/iosvideo/libiosvideo.la
endif
if HAVE_WIN32
ENABLE_VIDEO_LIBS+= \
./media/video/winvideo/libwinvideo.la
endif
endif
SUBDIRS = client media config sip upnp security jamidht im $(ENABLE_VIDEO_SUBDIR)
if ENABLE_PLUGIN
SUBDIRS+=plugin
endif
# libring
lib_LTLIBRARIES = libring.la
libring_la_LIBADD = \
./sip/libsiplink.la \
./media/libmedia.la \
./client/libclient.la \
./config/libconfig.la \
./security/libsecurity.la \
./upnp/libupnpcontrol.la \
./jamidht/libringacc.la \
./im/libim.la \
$(ENABLE_PLUGIN_LIBS) \
$(ENABLE_VIDEO_LIBS)
libring_la_LDFLAGS = \
@PJPROJECT_LIBS@ \
@ALSA_LIBS@ \
@PULSEAUDIO_LIBS@ \
@YAMLCPP_LIBS@ \
@JSONCPP_LIBS@ \
@SPEEXDSP_LIBS@ \
@LIBUPNP_LIBS@ \
@PORTAUDIO_LIBS@ \
@GNUTLS_LIBS@ \
@OPENDHT_LIBS@ \
@SECP256K1_LIBS@ \
@ZLIB_LIBS@ \
@LIBSSL_LIBS@ \
@LIBCRYPTO_LIBS@ \
@LIBAVCODEC_LIBS@ \
@LIBAVFORMAT_LIBS@ \
@LIBAVDEVICE_LIBS@ \
@LIBAVFILTER_LIBS@ \
@LIBSWRESAMPLE_LIBS@ \
@LIBSWSCALE_LIBS@ \
@LIBAVUTIL_LIBS@ \
@LIBS@ \
@WEBRTC_LIBS@
if ENABLE_PLUGIN
libring_la_LDFLAGS+= \
@ARCHIVE_LIBS@
endif
if HAVE_WIN32
libring_la_LDFLAGS += -no-undefined -avoid-version
endif
if HAVE_OSX
#FIXME necessary for -lintl
libring_la_LDFLAGS += -L/usr/local/opt/gettext/lib
endif
libring_la_CFLAGS = \
@PJPROJECT_CFLAGS@ \
@ALSA_CFLAGS@ \
@PULSEAUDIO_CFLAGS@ \
@LIBUPNP_CFLAGS@ \
@SPEEXDSP_CFLAGS@ \
@PORTAUDIO_CFLAGS@ \
@GNUTLS_CFLAGS@ \
@OPENDHT_CFLAGS@ \
@LIBAVCODEC_CFLAGS@
@LIBAVFORMAT_CFLAGS@ \
@LIBAVUTIL_CFLAGS@ \
@LIBAVDEVICE_CFLAGS@ \
@LIBAVFILTER_CFLAGS@ \
@LIBSWRESAMPLE_CFLAGS@ \
@LIBSWSCALE_CFLAGS@ \
@WEBRTC_CFLAGS@
libring_la_CXXFLAGS = @JSONCPP_CFLAGS@
if HAVE_LINUX
#needed to compile the .so
libring_la_CXXFLAGS += -fPIC
endif
libring_la_SOURCES = \
buildinfo.cpp \
conference.cpp \
account_factory.cpp \
call_factory.cpp \
preferences.cpp \
manager.cpp \
call.cpp \
account.cpp \
logger.cpp \
fileutils.cpp \
archiver.cpp \
threadloop.cpp \
ip_utils.h \
ip_utils.cpp \
utf8_utils.cpp \
ice_transport.cpp \
ice_transport.h \
threadloop.h \
conference.h \
account_factory.h \
call_factory.h \
preferences.h \
manager.h \
account.h \
call.h \
logger.h \
fileutils.h \
archiver.h \
noncopyable.h \
utf8_utils.h \
ring_types.h \
compiler_intrinsics.h \
array_size.h \
account_schema.h \
registration_states.h \
map_utils.h \
string_utils.h \
string_utils.cpp \
rw_mutex.h \
ring_api.cpp \
rational.h \
smartools.cpp \
smartools.h \
base64.h \
base64.cpp \
peer_connection.cpp \
peer_connection.h \
data_transfer.cpp \
data_transfer.h \
ftp_server.cpp \
ftp_server.h \
generic_io.h \
scheduled_executor.h \
scheduled_executor.cpp \
transport/peer_channel.h
if HAVE_WIN32
libring_la_SOURCES += \
dlfcn.c \
winsyslog.c
endif
nobase_include_HEADERS= dring/dring.h \
dring/security_const.h \
dring/callmanager_interface.h \
dring/configurationmanager_interface.h \
dring/presencemanager_interface.h \
dring/datatransfer_interface.h \
dring/account_const.h \
dring/call_const.h \
dring/presence_const.h \
dring/media_const.h \
dring/def.h
if ENABLE_PLUGIN
nobase_include_HEADERS+= \
dring/plugin_manager_interface.h
endif
if ENABLE_VIDEO
nobase_include_HEADERS+= \
dring/videomanager_interface.h
endif