Commit 64df6cb5 authored by johan's avatar johan

Initial commit based on Dragos Oancea contribution

parents
.deps/
INSTALL
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
build-aux/
config.log
config.status
configure
libtool
*.o
*.lo
*.la
libbcg729.pc
test/src/decoderTest
test/src/encoderTest
.libs
Copyright Belledonne Communications SARL, all rights reserved.
Dragos Oancea @ Orange Vallee
Johan Pascal
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libmscodec2
LOCAL_SRC_FILES := mscodec2.c
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/../linphone/oRTP/include \
$(LOCAL_PATH)/../linphone/mediastreamer2/include \
$(LOCAL_PATH)/../externals/codec2/include
LOCAL_CFLAGS += -DVERSION=\"android\" -include $(LOCAL_PATH)/../externals/build/codec2/codec2_prefixed_symbols.h
LOCAL_STATIC_LIBRARIES = libcodec2
include $(BUILD_STATIC_LIBRARY)
This diff is collapsed.
ACLOCAL_AMFLAGS = -I m4
pluginsdir = $(libdir)/mediastreamer/plugins
plugins_LTLIBRARIES=libmscodec2.la
libmscodec2_la_SOURCES = mscodec2.c
libmscodec2_la_CFLAGS = $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(CODEC2_CFLAGS) \
$(MSCODEC2_CFLAGS)
libmscodec2_la_LIBADD = $(ORTP_LIBS) $(MEDIASTREAMER_LIBS) $(CODEC2_LIBS)
.phony: rpm
rpm:
$(MAKE) dist
TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz
This package supplies the mediastreamer plugin for the codec2 audio
codec, which is necessary to use codec2 with Linphone. The package
does not contain the codec, which must be obtained separately.
More information on codec2 at http://rowetel.com/codec2.html
Codec2 is distributed by David Rowe under GNU Lesser General Public License (LGPL)
This package use the 3200 bits/s mode of codec2 by default but it may
also be tuned to use the 2400 bits/s mode. It was tested on stable branch 0.3
of the codec2 library.
#!/bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
#AM_VERSION="1.11"
if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
AUTOMAKE=automake
ACLOCAL=aclocal
else
ACLOCAL=aclocal-${AM_VERSION}
AUTOMAKE=automake-${AM_VERSION}
fi
if test -f /opt/local/bin/glibtoolize ; then
# darwin
LIBTOOLIZE=/opt/local/bin/glibtoolize
else
LIBTOOLIZE=libtoolize
fi
if test -d /opt/local/share/aclocal ; then
ACLOCAL_ARGS="-I /opt/local/share/aclocal"
fi
echo "Generating build scripts for G729 codec..."
set -x
$LIBTOOLIZE --copy --force
$ACLOCAL $ACLOCAL_ARGS
autoheader
$AUTOMAKE --force-missing --add-missing --copy
autoconf
cd $THEDIR
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([mscodec2],[0.1])
AC_CANONICAL_SYSTEM
AC_PREREQ(2.63)
AC_CONFIG_SRCDIR([mscodec2.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([tar-ustar --warnings=no-portability])
AC_PROG_LIBTOOL
AC_PROG_CC
AC_CONFIG_HEADERS(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_ARG_ENABLE(strict,
[ --enable-strict Enable error on compilation warning [default=yes]],
[wall_werror=$enableval],
[wall_werror=yes]
)
CFLAGS="$CFLAGS -Wall"
if test $GCC = yes && test $wall_werror = yes; then
CFLAGS="$CFLAGS -Werror "
fi
dnl check for libraries that have pkg-config files installed
PKG_CHECK_MODULES(ORTP, ortp >= 0.24.2,[found_ortp=true],foo=bar)
PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.11.2,[found_ms2=true],foo=bar)
dnl Check for lib codec2
AC_ARG_WITH( codec2,
[ --with-codec2 Set prefix where lib codec2 can be found (ex:/usr, /usr/local)[[default=PREFIX or /usr if NONE]] ],
[ codec2_prefix=${withval}],[ if test "$prefix" != "NONE"; then
codec2_prefix=${prefix}
else
codec2_prefix="/usr"
fi ])
found_codec2=no
if test "$codec2_prefix" != "none" ; then
if test "$codec2_prefix" != "/usr" ; then
CODEC2_CFLAGS="-I${codec2_prefix}/include"
CODEC2_LIBS="-L${codec2_prefix}/lib"
fi
CODEC2_LIBS="$CODEC2_LIBS -lcodec2"
CPPFLAGS_save=$CPPFLAGS
LIBS_save=$LIBS
CPPFLAGS="$CPPFLAGS $CODEC2_CFLAGS"
LIBS="$LIBS $CODEC2_LIBS"
AC_CHECK_HEADERS(codec2/codec2.h,
[found_codec2=yes; AC_MSG_NOTICE([codec2 usable])],
[CODEC2_CFLAGS=""
CODEC2_LIBS=""])
CPPFLAGS=$CPPFLAGS_save
LIBS=$LIBS_save
fi
if test "x$found_codec2" != "xyes" ; then
AC_MSG_ERROR("Requires lib codec2")
fi
AC_SUBST(ORTP_CFLAGS)
AC_SUBST(ORTP_LIBS)
AC_SUBST(MEDIASTREAMER_CFLAGS)
AC_SUBST(MEDIASTREAMER_LIBS)
AC_SUBST(CODEC2_CFLAGS)
AC_SUBST(CODEC2_LIBS)
VISIBILITY_CFLAGS=
case "$target_os" in
*mingw*)
CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501"
mingw_found=yes
;;
*)
VISIBILITY_CFLAGS="-fvisibility=hidden"
;;
esac
AC_SUBST(VISIBILITY_CFLAGS)
dnl Initialize libtool
LT_INIT([win32-dll shared ])
AC_CONFIG_COMMANDS([libtool-hacking],
[if test "$mingw_found" = "yes" ; then
echo "Hacking libtool to work with mingw..."
sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
cp -f ./libtool.tmp ./libtool
rm -f ./libtool.tmp
fi],
[mingw_found=$mingw_found]
)
dnl Create the following files from their .in counterparts
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT
This diff is collapsed.
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