Commit 0f4362e7 authored by Tristan Matthews's avatar Tristan Matthews

* #9381: fix celt plugin compilation on fedora

parent cd5a216a
......@@ -22,28 +22,6 @@ AC_PROG_MAKE_SET
dnl Where to find configure files
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
AC_CONFIG_FILES([test/Makefile])
......@@ -163,8 +141,6 @@ DBUS_CPP_REQUIRED_VERSION=0.6.0-pre1
PKG_CHECK_MODULES(DBUSCPP, dbus-c++-1,,
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_PTHREAD
......@@ -229,13 +205,21 @@ AS_IF([test "x$with_celt" != xno],
with_celt_71=yes; AC_MSG_NOTICE([Using celt 0.7.1])
],
[
AC_MSG_FAILURE([libcelt link test failed. You may use --without-celt to compile without celt codec support.])
])
])]
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.])
])
])
])]
)
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_071, test "x$with_celt_071" = "xyes" )
dnl Check for IAX
AC_ARG_WITH([iax2], [AS_HELP_STRING([--without-iax2],
......@@ -268,6 +252,31 @@ AC_DEFUN([BB_ENABLE_DOXYGEN],
# Acutally perform the doxygen check
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!
AC_OUTPUT
......
......@@ -43,6 +43,3 @@ libaudio_la_LIBADD = \
./alsa/libalsalayer.la \
./pulseaudio/libpulselayer.la \
./sound/libsound.la
......@@ -8,7 +8,6 @@ libcodecdescriptor_la_LIBADD = $(CCRTP_LIBS)
if BUILD_GSM
GSM_LIB = libcodec_gsm.so
libcodec_gsm_so_SOURCES = gsmcodec.cpp
libcodec_gsm_so_CFLAGS = -fPIC -g -Wall
libcodec_gsm_so_CXXFLAGS = -fPIC -g -Wall
libcodec_gsm_so_LDFLAGS = --shared -lc -lgsm
libcodec_gsm_so_LDADD = libcodecdescriptor.la
......@@ -18,9 +17,8 @@ endif
if BUILD_SPEEX
SPEEX_NB_LIB = libcodec_speex_nb.so
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_LDFLAGS = --shared -lc -lspeex $(SPEEX_NIMP)
libcodec_speex_nb_so_LDFLAGS = --shared -lc -lspeex
libcodec_speex_nb_so_LDADD = libcodecdescriptor.la
INSTALL_SPEEX_NB_RULE = install-libcodec_speex_nb_so
endif
......@@ -28,9 +26,8 @@ endif
if BUILD_SPEEX
SPEEX_WB_LIB = libcodec_speex_wb.so
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_LDFLAGS = --shared -lc -lspeex $(SPEEX_NIMP)
libcodec_speex_wb_so_LDFLAGS = --shared -lc -lspeex
libcodec_speex_wb_so_LDADD = libcodecdescriptor.la
INSTALL_SPEEX_WB_RULE = install-libcodec_speex_wb_so
endif
......@@ -38,9 +35,8 @@ endif
if BUILD_SPEEX
SPEEX_UB_LIB = libcodec_speex_ub.so
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_LDFLAGS = --shared -lc -lspeex $(SPEEX_NIMP)
libcodec_speex_ub_so_LDFLAGS = --shared -lc -lspeex
libcodec_speex_ub_so_LDADD = libcodecdescriptor.la
INSTALL_SPEEX_UB_RULE = install-libcodec_speex_ub_so
endif
......@@ -48,9 +44,8 @@ endif
if BUILD_CELT_91
CELT_LIB = libcodec_celt.so
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_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
......@@ -58,9 +53,17 @@ endif
if BUILD_CELT_71
CELT_LIB = libcodec_celt.so
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_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
INSTALL_CELT_RULE = install-libcodec_celt_so
endif
......@@ -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
libcodec_ulaw_so_SOURCES = ulaw.cpp
libcodec_ulaw_so_CFLAGS = -fPIC -g -Wall
libcodec_ulaw_so_CXXFLAGS = -fPIC -g -Wall
libcodec_ulaw_so_LDADD = libcodecdescriptor.la
libcodec_ulaw_so_LDFLAGS = --shared -lc
libcodec_alaw_so_SOURCES = alaw.cpp
libcodec_alaw_so_CFLAGS = -fPIC -g -Wall
libcodec_alaw_so_CXXFLAGS = -fPIC -g -Wall
libcodec_alaw_so_LDADD = libcodecdescriptor.la
libcodec_alaw_so_LDFLAGS = --shared -lc
libcodec_g722_so_SOURCES = g722.cpp
libcodec_g722_so_CFLAGS = -fPIC -g -Wall
libcodec_g722_so_CXXFLAGS = -fPIC -g -Wall
libcodec_g722_so_LDADD = libcodecdescriptor.la
libcodec_g722_so_LDFLAGS = --shared -lc
......
......@@ -30,7 +30,12 @@
#include "audiocodec.h"
#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>
#endif
#include <stdexcept>
#include "noncopyable.h"
......
Markdown is supported
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