Skip to content
Snippets Groups Projects
Commit fde52c61 authored by sfl's avatar sfl
Browse files

Ajout Des configure.ac et Makefile

parent b3a79a1e
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ dnl
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([SFLPhone],[0.7],[sflphoneteam@savoirfairelinux.com],[sflphone])
AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2007]])
AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2008]])
AC_REVISION([$Revision$])
dnl Compute canonical system name
......@@ -35,20 +35,23 @@ AC_CONFIG_FILES([libs/Makefile \
AC_CONFIG_FILES([src/Makefile \
src/sflphone \
src/audio/Makefile \
src/audio/gsm/Makefile \
src/audio/codecs/Makefile
src/audio/codecs/ilbc/Makefile \
src/config/Makefile \
src/dbus/Makefile \
src/zeroconf/Makefile \
src/video/Makefile \
src/video/VideoCodec/Makefile \
src/video/V4L/Makefile \
src/memmanager/Makefile \
src/mixer/Makefile])
src/memmanager/Makefile])
AC_CONFIG_FILES([skins/Makefile \
skins/metal/Makefile \
skins/gmetal/Makefile \
ringtones/Makefile])
AC_CONFIG_FILES([doc/Makefile \
doc/doxygen/Makefile])
AC_CONFIG_FILES([platform/debian/changelog \
platform/rpm/sflphone.spec \
......@@ -156,6 +159,11 @@ PKG_CHECK_MODULES([libosip2], [libosip2 >= ${LIBOSIP2_OSIPLISTNOPOINTER_MIN_VERS
SIP_CFLAGS="$SIP_CFLAGS $LIBOSIP2_CFLAGS";
AC_SUBST(SIP_CFLAGS)
dnl LIBGSM1_MIN_VERSION=1.10
dnl PKG_CHECK_MODULES(gsm, gsm >= ${LIBGSM1_MIN_VERSION})
dnl SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libgsm1_CFLAGS"
dnl SFLPHONE_LIBS="$SFLPHONE_LIBS $libgsm1_LIBS"
LIBSAMPLERATE_MIN_VERSION=0.1.1
PKG_CHECK_MODULES(samplerate, samplerate >= ${LIBSAMPLERATE_MIN_VERSION})
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $samplerate_CFLAGS"
......@@ -191,43 +199,73 @@ PKG_CHECK_MODULES(libdbuscpp, dbus-c++-1 >= ${LIBDBUSCPP_MIN_VERSION})
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libdbuscpp_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libdbuscpp_LIBS"
LIBAVCODEC_MIN_VERSION=0.5
PKG_CHECK_MODULES(libavcodec, libavcodec >= ${LIBAVCODEC_MIN_VERSION})
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $LIBAVCODEC_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $LIBAVCODEC_LIBS"
# check for libboost (doesn't use pkg-config)
AC_CHECK_HEADER(boost/tokenizer.hpp, , AC_MSG_ERROR("Unable to find the libboost tokenizer headers; you may need to install the libboost-dev package" ) )
# check for libgsm1 (doesn't use pkg-config)
dnl Check for libspeex
AC_ARG_WITH([gsm],
[AS_HELP_STRING([--without-gsm],
[disable support for gsm codec])],
[],
[with_gsm=yes])
LIBGSM=
AS_IF([test "x$with_gsm" != xno],
[AC_CHECK_HEADER([gsm.h], , AC_MSG_FAILURE([Unable to find the libgsm1 headers (you may need to install the dev package). You may use --without-gsm to compile without gsm codec support.]))]
[AC_CHECK_LIB([gsm], [gsm_decode],
[],
[AC_MSG_FAILURE(
[libgsm link test failed. You may use --without-gsm to compile without gsm codec support.])]
)
]
)
AC_DEFINE([HAVE_GSM], test "x$with_gsm" = "xyes", [Define if you have libgsm])
AM_CONDITIONAL(BUILD_GSM, test "x$with_gsm" = "xyes" )
dnl Check for libspeex
AC_ARG_WITH([speex],
[AS_HELP_STRING([--without-speex],
[disable support for speex codec])],
[],
[with_speex=yes])
LIBSPEEX=
AS_IF([test "x$with_speex" != xno],
[AC_CHECK_HEADER([speex/speex.h], , AC_MSG_FAILURE([Unable to find the libspeex headers (you may need to install the dev package). You may use --without-speex to compile without speex codec support.]))]
[AC_CHECK_LIB([speex], [speex_decode_int],
[],
[AC_MSG_FAILURE(
[libspeex link test failed. You may use --without-speex to compile without speex codec support.])]
)
]
)
AC_DEFINE([HAVE_SPEEX], test "x$with_speex" = "xyes", [Define if you have libspeex])
AM_CONDITIONAL(BUILD_SPEEX, test "x$with_speex" = "xyes" )
dnl Check for speex
AC_ARG_ENABLE(speex,
AS_HELP_STRING(
[--enable-speex],
[compile with speex codec @<:@default=no@:>@]
),
[with_speex=$enableval],
[with_speex=no]
)
if test "x$with_speex" = "xyes" ; then
AC_CHECK_HEADER([speex/speex.h], [
AC_CHECK_LIB(speex, speex_decode_int,
[
with_speex=yes
], [ with_speex=no ]
)
], [ with_speex=no ]
)
fi
AM_CONDITIONAL(USE_SPEEX, test "x$with_speex" = "xyes" )
dnl Check for IAX
AC_ARG_ENABLE(iax2,
AS_HELP_STRING(
[--disable-iax2],
[disable iax2 library support @<:@default=no@:>@]
),
[with_iax2=$enableval],
[with_iax2=yes]
)
AM_CONDITIONAL(USE_IAX, test x$with_iax2 = xyes)
AC_ARG_WITH([iax2],
[AS_HELP_STRING([--without-iax2],
[disable support for the iax2 protocol])],
[],
[with_iax2=yes])
LIBIAX2=
AS_IF([test "x$with_iax2" != xno],
[AC_CHECK_HEADER([iax/iax.h], , AC_MSG_FAILURE([Unable to find the libiax2 headers (you may need to install the dev package). You may use --without-iax2 to compile without iax2 protocol support.]))]
[AC_CHECK_LIB([iax], [iax_init],
[],
[AC_MSG_FAILURE(
[libiax2 link test failed. You may use --without-iax2 to compile without iax2 protocol support.])]
)
]
)
AC_DEFINE([HAVE_IAX], test "x$with_iax2" = "xyes", [Define if you have libiax2])
AM_CONDITIONAL(USE_IAX, test "x$with_iax2" = "xyes" )
dnl Check for readline
GNUPG_CHECK_READLINE
......@@ -279,6 +317,48 @@ fi
AC_SUBST(LIB_DNSSD)
AM_CONDITIONAL(USE_ZEROCONF, test "$have_libdns_sd" = "yes")
# check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/
# ----------------------------------------------------------------------------
AC_DEFUN([BB_ENABLE_DOXYGEN],
[
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
if test "x$enable_doxygen" = xno; then
enable_doc=no
else
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
if test x$DOXYGEN = x; then
if test "x$enable_doxygen" = xyes; then
AC_MSG_ERROR([could not find doxygen])
fi
enable_doc=no
else
enable_doc=yes
AC_PATH_PROG(DOT, dot, , $PATH)
fi
fi
AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
if test x$DOT = x; then
if test "x$enable_dot" = xyes; then
AC_MSG_ERROR([could not find dot])
fi
enable_dot=no
else
enable_dot=yes
fi
AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue)
AC_SUBST(enable_dot)
AC_SUBST(enable_html_docs)
AC_SUBST(enable_latex_docs)
])
# Acutally perform the doxygen check
BB_ENABLE_DOXYGEN
dnl Datadir directory
sflphone_datadir=$datadir/sflphone
AC_SUBST(sflphone_datadir)
......
......@@ -28,7 +28,7 @@ IAXSOURCES =
IAXHEADERS =
endif
SUBDIRS = audio config dbus $(ZEROCONFDIR)
SUBDIRS = audio config dbus memmanager mixer video $(ZEROCONFDIR)
sflphoned_SOURCES = eventthread.cpp main.cpp voiplink.cpp \
managerimpl.cpp observer.cpp \
......@@ -51,6 +51,9 @@ libsflphone_la_LIBADD = \
./audio/libaudio.la \
./dbus/libdbus.la \
./config/libconfig.la \
./memmanager/libmemmanager.la \
./mixer/libmixer.la \
./video/libvideo.la \
$(IAX_LIBS)
libsflphone_la_SOURCES =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment