Skip to content
Snippets Groups Projects
Commit 0f4362e7 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #9381: fix celt plugin compilation on fedora

parent cd5a216a
No related branches found
No related tags found
No related merge requests found
...@@ -22,28 +22,6 @@ AC_PROG_MAKE_SET ...@@ -22,28 +22,6 @@ AC_PROG_MAKE_SET
dnl Where to find configure files dnl Where to find configure files
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
dnl What to generate
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libs/Makefile \
libs/utilspp/Makefile \
libs/utilspp/singleton/Makefile \
libs/iax2/Makefile])
AC_CONFIG_FILES([src/Makefile \
src/sip/Makefile \
src/im/Makefile \
src/iax/Makefile \
src/audio/Makefile \
src/audio/audiortp/Makefile \
src/audio/pulseaudio/Makefile \
src/audio/alsa/Makefile \
src/audio/sound/Makefile \
src/audio/codecs/Makefile \
src/config/Makefile \
src/dbus/Makefile \
src/hooks/Makefile \
src/history/Makefile])
dnl Unit tests section dnl Unit tests section
AC_CONFIG_FILES([test/Makefile]) AC_CONFIG_FILES([test/Makefile])
...@@ -163,8 +141,6 @@ DBUS_CPP_REQUIRED_VERSION=0.6.0-pre1 ...@@ -163,8 +141,6 @@ DBUS_CPP_REQUIRED_VERSION=0.6.0-pre1
PKG_CHECK_MODULES(DBUSCPP, dbus-c++-1,, PKG_CHECK_MODULES(DBUSCPP, dbus-c++-1,,
AC_MSG_ERROR([You need the DBus-c++ libraries (version $DBUS_CPP_REQUIRED_VERSION or better)])) AC_MSG_ERROR([You need the DBus-c++ libraries (version $DBUS_CPP_REQUIRED_VERSION or better)]))
CXXFLAGS="${CXXFLAGS} -g -Wno-return-type -Wall -Wextra -Wnon-virtual-dtor -Weffc++ -Wfatal-errors"
AX_LIB_EXPAT AX_LIB_EXPAT
AX_PTHREAD AX_PTHREAD
...@@ -228,14 +204,22 @@ AS_IF([test "x$with_celt" != xno], ...@@ -228,14 +204,22 @@ AS_IF([test "x$with_celt" != xno],
[ [
with_celt_71=yes; AC_MSG_NOTICE([Using celt 0.7.1]) with_celt_71=yes; AC_MSG_NOTICE([Using celt 0.7.1])
], ],
[
dnl celt071 is how certain distros package celt
PKG_CHECK_MODULES(CELT, celt071 >= 0.7.1,
[
with_celt_071=yes; AC_MSG_NOTICE([Using celt071])
],
[ [
AC_MSG_FAILURE([libcelt link test failed. You may use --without-celt to compile without celt codec support.]) AC_MSG_FAILURE([libcelt link test failed. You may use --without-celt to compile without celt codec support.])
]) ])
])
])] ])]
) )
AM_CONDITIONAL(BUILD_CELT_91, test "x$with_celt_91" = "xyes" ) AM_CONDITIONAL(BUILD_CELT_91, test "x$with_celt_91" = "xyes" )
AM_CONDITIONAL(BUILD_CELT_71, test "x$with_celt_71" = "xyes" ) AM_CONDITIONAL(BUILD_CELT_71, test "x$with_celt_71" = "xyes" )
AM_CONDITIONAL(BUILD_CELT_071, test "x$with_celt_071" = "xyes" )
dnl Check for IAX dnl Check for IAX
AC_ARG_WITH([iax2], [AS_HELP_STRING([--without-iax2], AC_ARG_WITH([iax2], [AS_HELP_STRING([--without-iax2],
...@@ -268,6 +252,31 @@ AC_DEFUN([BB_ENABLE_DOXYGEN], ...@@ -268,6 +252,31 @@ AC_DEFUN([BB_ENABLE_DOXYGEN],
# Acutally perform the doxygen check # Acutally perform the doxygen check
BB_ENABLE_DOXYGEN BB_ENABLE_DOXYGEN
CXXFLAGS="${CXXFLAGS} -g -Wno-return-type -Wall -Wextra -Wnon-virtual-dtor -Weffc++ -Wfatal-errors"
dnl What to generate
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libs/Makefile \
libs/utilspp/Makefile \
libs/utilspp/singleton/Makefile \
libs/iax2/Makefile])
AC_CONFIG_FILES([src/Makefile \
src/sip/Makefile \
src/im/Makefile \
src/iax/Makefile \
src/audio/Makefile \
src/audio/audiortp/Makefile \
src/audio/pulseaudio/Makefile \
src/audio/alsa/Makefile \
src/audio/sound/Makefile \
src/audio/codecs/Makefile \
src/config/Makefile \
src/dbus/Makefile \
src/hooks/Makefile \
src/history/Makefile])
# Go! # Go!
AC_OUTPUT AC_OUTPUT
......
...@@ -43,6 +43,3 @@ libaudio_la_LIBADD = \ ...@@ -43,6 +43,3 @@ libaudio_la_LIBADD = \
./alsa/libalsalayer.la \ ./alsa/libalsalayer.la \
./pulseaudio/libpulselayer.la \ ./pulseaudio/libpulselayer.la \
./sound/libsound.la ./sound/libsound.la
...@@ -8,7 +8,6 @@ libcodecdescriptor_la_LIBADD = $(CCRTP_LIBS) ...@@ -8,7 +8,6 @@ libcodecdescriptor_la_LIBADD = $(CCRTP_LIBS)
if BUILD_GSM if BUILD_GSM
GSM_LIB = libcodec_gsm.so GSM_LIB = libcodec_gsm.so
libcodec_gsm_so_SOURCES = gsmcodec.cpp libcodec_gsm_so_SOURCES = gsmcodec.cpp
libcodec_gsm_so_CFLAGS = -fPIC -g -Wall
libcodec_gsm_so_CXXFLAGS = -fPIC -g -Wall libcodec_gsm_so_CXXFLAGS = -fPIC -g -Wall
libcodec_gsm_so_LDFLAGS = --shared -lc -lgsm libcodec_gsm_so_LDFLAGS = --shared -lc -lgsm
libcodec_gsm_so_LDADD = libcodecdescriptor.la libcodec_gsm_so_LDADD = libcodecdescriptor.la
...@@ -18,9 +17,8 @@ endif ...@@ -18,9 +17,8 @@ endif
if BUILD_SPEEX if BUILD_SPEEX
SPEEX_NB_LIB = libcodec_speex_nb.so SPEEX_NB_LIB = libcodec_speex_nb.so
libcodec_speex_nb_so_SOURCES = speexcodec_nb.cpp libcodec_speex_nb_so_SOURCES = speexcodec_nb.cpp
libcodec_speex_nb_so_CFLAGS = -fPIC -g -Wall
libcodec_speex_nb_so_CXXFLAGS = -fPIC -g -Wall $(SPEEXDSP) libcodec_speex_nb_so_CXXFLAGS = -fPIC -g -Wall $(SPEEXDSP)
libcodec_speex_nb_so_LDFLAGS = --shared -lc -lspeex $(SPEEX_NIMP) libcodec_speex_nb_so_LDFLAGS = --shared -lc -lspeex
libcodec_speex_nb_so_LDADD = libcodecdescriptor.la libcodec_speex_nb_so_LDADD = libcodecdescriptor.la
INSTALL_SPEEX_NB_RULE = install-libcodec_speex_nb_so INSTALL_SPEEX_NB_RULE = install-libcodec_speex_nb_so
endif endif
...@@ -28,9 +26,8 @@ endif ...@@ -28,9 +26,8 @@ endif
if BUILD_SPEEX if BUILD_SPEEX
SPEEX_WB_LIB = libcodec_speex_wb.so SPEEX_WB_LIB = libcodec_speex_wb.so
libcodec_speex_wb_so_SOURCES = speexcodec_wb.cpp libcodec_speex_wb_so_SOURCES = speexcodec_wb.cpp
libcodec_speex_wb_so_CFLAGS = -fPIC -g -Wall
libcodec_speex_wb_so_CXXFLAGS = -fPIC -g -Wall $(SPEEXDSP) libcodec_speex_wb_so_CXXFLAGS = -fPIC -g -Wall $(SPEEXDSP)
libcodec_speex_wb_so_LDFLAGS = --shared -lc -lspeex $(SPEEX_NIMP) libcodec_speex_wb_so_LDFLAGS = --shared -lc -lspeex
libcodec_speex_wb_so_LDADD = libcodecdescriptor.la libcodec_speex_wb_so_LDADD = libcodecdescriptor.la
INSTALL_SPEEX_WB_RULE = install-libcodec_speex_wb_so INSTALL_SPEEX_WB_RULE = install-libcodec_speex_wb_so
endif endif
...@@ -38,9 +35,8 @@ endif ...@@ -38,9 +35,8 @@ endif
if BUILD_SPEEX if BUILD_SPEEX
SPEEX_UB_LIB = libcodec_speex_ub.so SPEEX_UB_LIB = libcodec_speex_ub.so
libcodec_speex_ub_so_SOURCES = speexcodec_ub.cpp libcodec_speex_ub_so_SOURCES = speexcodec_ub.cpp
libcodec_speex_ub_so_CFLAGS = -fPIC -g -Wall
libcodec_speex_ub_so_CXXFLAGS = -fPIC -g -Wall $(SPEEXDSP) libcodec_speex_ub_so_CXXFLAGS = -fPIC -g -Wall $(SPEEXDSP)
libcodec_speex_ub_so_LDFLAGS = --shared -lc -lspeex $(SPEEX_NIMP) libcodec_speex_ub_so_LDFLAGS = --shared -lc -lspeex
libcodec_speex_ub_so_LDADD = libcodecdescriptor.la libcodec_speex_ub_so_LDADD = libcodecdescriptor.la
INSTALL_SPEEX_UB_RULE = install-libcodec_speex_ub_so INSTALL_SPEEX_UB_RULE = install-libcodec_speex_ub_so
endif endif
...@@ -48,9 +44,8 @@ endif ...@@ -48,9 +44,8 @@ endif
if BUILD_CELT_91 if BUILD_CELT_91
CELT_LIB = libcodec_celt.so CELT_LIB = libcodec_celt.so
libcodec_celt_so_SOURCES = celtcodec.cpp libcodec_celt_so_SOURCES = celtcodec.cpp
libcodec_celt_so_CFLAGS = -fPIC -g -Wall -DBUILD_CELT_91
libcodec_celt_so_CXXFLAGS = -fPIC -g -Wall -DBUILD_CELT_91 libcodec_celt_so_CXXFLAGS = -fPIC -g -Wall -DBUILD_CELT_91
libcodec_celt_so_LDFLAGS = --shared -lc -lcelt0 $(CELT_NIMP) libcodec_celt_so_LDFLAGS = --shared -lc ${CELT_LIBS}
libcodec_celt_so_LDADD = libcodecdescriptor.la libcodec_celt_so_LDADD = libcodecdescriptor.la
INSTALL_CELT_RULE = install-libcodec_celt_so INSTALL_CELT_RULE = install-libcodec_celt_so
endif endif
...@@ -58,9 +53,17 @@ endif ...@@ -58,9 +53,17 @@ endif
if BUILD_CELT_71 if BUILD_CELT_71
CELT_LIB = libcodec_celt.so CELT_LIB = libcodec_celt.so
libcodec_celt_so_SOURCES = celtcodec.cpp libcodec_celt_so_SOURCES = celtcodec.cpp
libcodec_celt_so_CFLAGS = -fPIC -g -Wall -DBUILD_CELT_71
libcodec_celt_so_CXXFLAGS = -fPIC -g -Wall -DBUILD_CELT_71 libcodec_celt_so_CXXFLAGS = -fPIC -g -Wall -DBUILD_CELT_71
libcodec_celt_so_LDFLAGS = --shared -lc -lcelt0 $(CELT_NIMP) libcodec_celt_so_LDFLAGS = --shared -lc ${CELT_LIBS}
libcodec_celt_so_LDADD = libcodecdescriptor.la
INSTALL_CELT_RULE = install-libcodec_celt_so
endif
if BUILD_CELT_071
CELT_LIB = libcodec_celt.so
libcodec_celt_so_SOURCES = celtcodec.cpp
libcodec_celt_so_CXXFLAGS = -fPIC -g -Wall -DBUILD_CELT_071 -I${top_srcdir}/src
libcodec_celt_so_LDFLAGS = --shared -lc ${CELT_LIBS}
libcodec_celt_so_LDADD = libcodecdescriptor.la libcodec_celt_so_LDADD = libcodecdescriptor.la
INSTALL_CELT_RULE = install-libcodec_celt_so INSTALL_CELT_RULE = install-libcodec_celt_so
endif endif
...@@ -70,19 +73,16 @@ noinst_PROGRAMS = libcodec_ulaw.so libcodec_alaw.so libcodec_g722.so $(GSM_LIB) ...@@ -70,19 +73,16 @@ noinst_PROGRAMS = libcodec_ulaw.so libcodec_alaw.so libcodec_g722.so $(GSM_LIB)
noinst_HEADERS = audiocodec.h audiocodecfactory.h speexcodec.h g722.h noinst_HEADERS = audiocodec.h audiocodecfactory.h speexcodec.h g722.h
libcodec_ulaw_so_SOURCES = ulaw.cpp libcodec_ulaw_so_SOURCES = ulaw.cpp
libcodec_ulaw_so_CFLAGS = -fPIC -g -Wall
libcodec_ulaw_so_CXXFLAGS = -fPIC -g -Wall libcodec_ulaw_so_CXXFLAGS = -fPIC -g -Wall
libcodec_ulaw_so_LDADD = libcodecdescriptor.la libcodec_ulaw_so_LDADD = libcodecdescriptor.la
libcodec_ulaw_so_LDFLAGS = --shared -lc libcodec_ulaw_so_LDFLAGS = --shared -lc
libcodec_alaw_so_SOURCES = alaw.cpp libcodec_alaw_so_SOURCES = alaw.cpp
libcodec_alaw_so_CFLAGS = -fPIC -g -Wall
libcodec_alaw_so_CXXFLAGS = -fPIC -g -Wall libcodec_alaw_so_CXXFLAGS = -fPIC -g -Wall
libcodec_alaw_so_LDADD = libcodecdescriptor.la libcodec_alaw_so_LDADD = libcodecdescriptor.la
libcodec_alaw_so_LDFLAGS = --shared -lc libcodec_alaw_so_LDFLAGS = --shared -lc
libcodec_g722_so_SOURCES = g722.cpp libcodec_g722_so_SOURCES = g722.cpp
libcodec_g722_so_CFLAGS = -fPIC -g -Wall
libcodec_g722_so_CXXFLAGS = -fPIC -g -Wall libcodec_g722_so_CXXFLAGS = -fPIC -g -Wall
libcodec_g722_so_LDADD = libcodecdescriptor.la libcodec_g722_so_LDADD = libcodecdescriptor.la
libcodec_g722_so_LDFLAGS = --shared -lc libcodec_g722_so_LDFLAGS = --shared -lc
......
...@@ -30,7 +30,12 @@ ...@@ -30,7 +30,12 @@
#include "audiocodec.h" #include "audiocodec.h"
#include <cstdio> #include <cstdio>
#ifdef BUILD_CELT_071
// FIXME: Hack to workaround celt's insufficient pkg-config file
#include <celt071/celt.h>
#else
#include <celt/celt.h> #include <celt/celt.h>
#endif
#include <stdexcept> #include <stdexcept>
#include "noncopyable.h" #include "noncopyable.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment