2006-06-28 23:37:53 +00:00
|
|
|
dnl SFLPhone - configure.ac for automake 1.9 and autoconf 2.59
|
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2006-07-24 13:26:16 +00:00
|
|
|
AC_PREREQ(2.59)
|
2006-06-29 02:57:49 +00:00
|
|
|
AC_INIT([SFLPhone],[0.7],[sflphoneteam@savoirfairelinux.com],[sflphone])
|
2006-06-28 23:37:53 +00:00
|
|
|
AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2006]])
|
|
|
|
AC_REVISION([$Revision$])
|
|
|
|
|
|
|
|
dnl Compute canonical system name
|
|
|
|
AC_CANONICAL_TARGET
|
2006-01-13 03:23:51 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Rewrite name of programs to be installed
|
|
|
|
AC_ARG_PROGRAM
|
2005-12-19 00:11:35 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Automake options
|
|
|
|
AM_INIT_AUTOMAKE([-Wall -Wno-portability])
|
|
|
|
|
|
|
|
dnl Improve make variable MAKE
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
|
|
dnl Where to find configure files
|
|
|
|
AC_CONFIG_SRCDIR([config.h.in])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
|
|
|
dnl What to generate
|
|
|
|
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_CONFIG_FILES([libs/Makefile \
|
|
|
|
libs/taxidermy/Makefile \
|
|
|
|
libs/stund/Makefile \
|
|
|
|
libs/utilspp/Makefile \
|
|
|
|
libs/utilspp/functor/Makefile \
|
|
|
|
libs/utilspp/singleton/Makefile])
|
|
|
|
AC_CONFIG_FILES([src/Makefile \
|
|
|
|
src/sflphone \
|
|
|
|
src/audio/Makefile \
|
|
|
|
src/audio/gsm/Makefile \
|
|
|
|
src/config/Makefile \
|
|
|
|
src/gui/Makefile \
|
|
|
|
src/gui/qt/Makefile \
|
|
|
|
src/gui/cli/Makefile \
|
|
|
|
src/gui/server/Makefile \
|
|
|
|
src/zeroconf/Makefile])
|
|
|
|
AC_CONFIG_FILES([skins/Makefile \
|
|
|
|
skins/metal/Makefile \
|
|
|
|
skins/gmetal/Makefile \
|
|
|
|
ringtones/Makefile])
|
|
|
|
AC_CONFIG_FILES([platform/debian/changelog platform/rpm/sflphone.spec \
|
|
|
|
platform/fedora/sflphoned.spec])
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
|
|
|
|
dnl Get project version
|
2005-12-19 00:11:35 +00:00
|
|
|
VERSION=`sed -ne 's/^#define SFLPHONED_VERSION "\(.*\)"/\1/p' ${srcdir}/src/global.h`
|
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Get rid of release number
|
2005-12-19 00:11:35 +00:00
|
|
|
RPM_VERSION=`echo $VERSION | cut -d- -f1`
|
2006-06-28 23:37:53 +00:00
|
|
|
AC_SUBST(RPM_VERSION)
|
2005-12-19 00:11:35 +00:00
|
|
|
RPM_RELEASE=`echo $VERSION | sed -ne 's/.*-\(.*\)/\1/p' `
|
2006-06-28 23:37:53 +00:00
|
|
|
AC_SUBST(RPM_RELEASE)
|
2005-12-19 00:11:35 +00:00
|
|
|
VERSION=`echo $VERSION | cut -d- -f1`
|
2006-06-28 23:37:53 +00:00
|
|
|
AC_SUBST(VERSION)
|
2005-12-19 00:11:35 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Settings need Standard C++ Library
|
2005-12-19 00:11:35 +00:00
|
|
|
LIBS="$LIBS -lstdc++"
|
|
|
|
|
|
|
|
dnl Solaris pkgadd support definitions
|
2006-06-28 23:37:53 +00:00
|
|
|
PKGADD_PKG="SFLPhone"
|
2005-12-19 00:11:35 +00:00
|
|
|
PKGADD_NAME="SFLPhone - a SIP client and daemon"
|
|
|
|
PKGADD_VENDOR="http://www.sflphone.org/"
|
|
|
|
AC_SUBST(PKGADD_PKG)
|
|
|
|
AC_SUBST(PKGADD_NAME)
|
|
|
|
AC_SUBST(PKGADD_VENDOR)
|
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for programs
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
2005-12-19 00:11:35 +00:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Define C++ as default language
|
|
|
|
AC_LANG(C++)
|
2006-05-25 12:01:00 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Setup C++ compiler flags
|
|
|
|
CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS $USER_INCLUDES"
|
2005-12-19 00:11:35 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for header files
|
|
|
|
AC_FUNC_ALLOCA
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h malloc.h \
|
|
|
|
memory.h netdb.h netinet/in.h stdlib.h string.h strings.h \
|
|
|
|
sys/ioctl.h sys/socket.h sys/time.h unistd.h utime.h ostream])
|
|
|
|
|
|
|
|
dnl Check for typedefs, structures, and compiler characteristics
|
|
|
|
AC_HEADER_STAT
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_C_VOLATILE
|
|
|
|
AC_CHECK_TYPES([ptrdiff_t])
|
|
|
|
|
|
|
|
dnl Check for library functions
|
|
|
|
AC_FUNC_CHOWN
|
|
|
|
AC_FUNC_ERROR_AT_LINE
|
|
|
|
AC_FUNC_FORK
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_STAT
|
|
|
|
AC_FUNC_UTIME_NULL
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS([bzero floor gethostbyname gethrtime gettimeofday \
|
|
|
|
inet_ntoa memset mkdir pathconf pow regcomp select setlocale socket \
|
|
|
|
strchr strdup strerror strrchr strstr strtol utime])
|
|
|
|
|
|
|
|
dnl Check for portaudio
|
2006-07-05 02:34:19 +00:00
|
|
|
dnl PORTAUDIO_SETUP
|
2006-05-25 12:01:00 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for exosip2
|
2006-05-01 16:37:36 +00:00
|
|
|
LP_CHECK_EXOSIP2
|
2006-06-28 23:37:53 +00:00
|
|
|
SFLPHONE_LIBS="$SFLPHONE_LIBS $EXOSIP_LIBS"
|
2006-05-01 16:37:36 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for samplerate on darwin
|
2005-12-19 00:11:35 +00:00
|
|
|
with_samplerate=no
|
|
|
|
case $host in
|
|
|
|
*darwin*)
|
|
|
|
AC_CHECK_HEADER([libsamplerate.h], [
|
2006-01-12 17:55:39 +00:00
|
|
|
AC_CHECK_LIB(samplerate, src_simple, [with_samplerate=yes], [with_samplerate=no])
|
2005-12-19 00:11:35 +00:00
|
|
|
], [ with_samplerate=no ]
|
|
|
|
)
|
|
|
|
;;
|
|
|
|
esac
|
2006-01-12 17:55:39 +00:00
|
|
|
AM_CONDITIONAL(USE_SAMPLERATE, test x$with_samplerate = xyes)
|
2005-12-19 00:11:35 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for GNU ccRTP
|
|
|
|
PKG_PROG_PKG_CONFIG
|
2006-05-25 12:01:00 +00:00
|
|
|
|
2005-12-19 00:11:35 +00:00
|
|
|
LIBCCGNU2_MIN_VERSION=1.3.1
|
|
|
|
PKG_CHECK_MODULES(libccgnu2, libccgnu2 >= ${LIBCCGNU2_MIN_VERSION})
|
2006-06-28 23:37:53 +00:00
|
|
|
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libccgnu2_CFLAGS"
|
2005-12-19 00:11:35 +00:00
|
|
|
SFLPHONE_LIBS="$SFLPHONE_LIBS $libccgnu2_LIBS"
|
|
|
|
|
|
|
|
LIBCCEXT2_MIN_VERSION=1.3.1
|
|
|
|
PKG_CHECK_MODULES(libccext2, libccext2 >= ${LIBCCEXT2_MIN_VERSION})
|
2006-06-28 23:37:53 +00:00
|
|
|
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libccext2_CFLAGS"
|
2005-12-19 00:11:35 +00:00
|
|
|
SFLPHONE_LIBS="$SFLPHONE_LIBS $libccext2_LIBS"
|
|
|
|
|
|
|
|
LIBCCRT_MIN_VERSION=1.3.0
|
|
|
|
PKG_CHECK_MODULES(libccrtp1, libccrtp1 >= ${LIBCCRT_MIN_VERSION})
|
2006-06-28 23:37:53 +00:00
|
|
|
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libccrtp1_CFLAGS"
|
2005-12-19 00:11:35 +00:00
|
|
|
SFLPHONE_LIBS="$SFLPHONE_LIBS $libccrtp1_LIBS"
|
|
|
|
|
2006-07-05 02:34:19 +00:00
|
|
|
LIBPORTAUDIO_MIN_VERSION=19
|
|
|
|
PKG_CHECK_MODULES(libportaudio, portaudio-2.0 >= ${LIBPORTAUDIO_MIN_VERSION})
|
|
|
|
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libportaudio_CFLAGS"
|
|
|
|
SFLPHONE_LIBS="$SFLPHONE_LIBS $libportaudio_LIBS"
|
|
|
|
|
|
|
|
LIBPORTAUDIOCPP_MIN_VERSION=12
|
|
|
|
PKG_CHECK_MODULES(libportaudiocpp, portaudiocpp >= ${LIBPORTAUDIOCPP_MIN_VERSION})
|
|
|
|
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libportaudiocpp_CFLAGS"
|
|
|
|
SFLPHONE_LIBS="$SFLPHONE_LIBS $libportaudiocpp_LIBS"
|
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for speex
|
2006-01-12 17:55:39 +00:00
|
|
|
AC_ARG_ENABLE(speex,
|
2006-06-28 23:37:53 +00:00
|
|
|
AS_HELP_STRING(
|
2006-01-12 17:55:39 +00:00
|
|
|
[--enable-speex],
|
|
|
|
[compile with speex codec @<:@default=no@:>@]
|
|
|
|
),
|
|
|
|
[with_speex=$enableval],
|
|
|
|
[with_speex=no]
|
|
|
|
)
|
2005-12-19 00:11:35 +00:00
|
|
|
|
|
|
|
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" )
|
2006-05-01 16:37:36 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for IAX
|
2006-04-05 16:30:54 +00:00
|
|
|
AC_ARG_ENABLE(iax2,
|
2006-06-28 23:37:53 +00:00
|
|
|
AS_HELP_STRING(
|
2006-04-05 16:30:54 +00:00
|
|
|
[--enable-iax2],
|
|
|
|
[compile with iax2 library support @<:@default=no@:>@]
|
|
|
|
),
|
|
|
|
[with_iax2=$enableval],
|
|
|
|
[with_iax2=no]
|
|
|
|
)
|
|
|
|
AM_CONDITIONAL(USE_IAX, test x$with_iax2 = xyes)
|
2005-12-19 00:11:35 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for readline
|
2006-01-17 21:38:29 +00:00
|
|
|
GNUPG_CHECK_READLINE
|
2006-01-12 17:55:39 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Check for zeroconf (from apple)
|
2006-01-12 17:55:39 +00:00
|
|
|
AC_ARG_ENABLE(zeroconf,
|
2006-06-28 23:37:53 +00:00
|
|
|
AS_HELP_STRING(
|
2006-01-12 17:55:39 +00:00
|
|
|
[--disable-zeroconf],
|
|
|
|
[disables libdns_sd (browsing and publishing DNS-SD services will not be possible) @<:@default=no@:>@]
|
|
|
|
),
|
|
|
|
[without_zeroconf=$enableval],
|
|
|
|
[without_zeroconf="no"]
|
|
|
|
)
|
|
|
|
if test "x$without_zeroconf" = "xno"; then
|
|
|
|
AC_MSG_CHECKING(for DNS-SD support)
|
|
|
|
save_dnssdtest_LIBS="$LIBS"
|
|
|
|
save_dnssdtest_LDFLAGS="$LDFLAGS"
|
|
|
|
save_dnssdtest_CPPFLAGS="$CPPFLAGS"
|
|
|
|
LDFLAGS="$all_libraries $LDFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $all_includes"
|
|
|
|
case $host_os in
|
|
|
|
darwin*) LIBS="" ;;
|
|
|
|
*) LIBS="-ldns_sd" ;;
|
|
|
|
esac
|
|
|
|
have_libdns_sd="no"
|
2006-06-28 23:37:53 +00:00
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_SOURCE([[
|
|
|
|
#include <dns_sd.h>
|
|
|
|
]], [[
|
|
|
|
DNSServiceRefDeallocate( (DNSServiceRef) 0);
|
|
|
|
TXTRecordDeallocate( (TXTRecordRef*) 0);
|
|
|
|
]])
|
|
|
|
],[
|
|
|
|
AC_DEFINE(HAVE_DNSSD, 1, [Define if dns-sd is available])
|
|
|
|
case $host_os in
|
|
|
|
darwin*) LIB_DNSSD="" ;;
|
|
|
|
*) LIB_DNSSD="-ldns_sd" ;;
|
|
|
|
esac
|
|
|
|
have_libdns_sd="yes"
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
LIB_DNSSD=""
|
|
|
|
])
|
2006-01-12 17:55:39 +00:00
|
|
|
CPPFLAGS=$save_dnssdtest_CPPFLAGS
|
|
|
|
LDFLAGS=$save_dnssdtest_LDFLAGS
|
|
|
|
LIBS=$save_dnssdtest_LIBS
|
2005-12-19 00:11:35 +00:00
|
|
|
fi
|
2006-01-12 17:55:39 +00:00
|
|
|
AC_SUBST(LIB_DNSSD)
|
|
|
|
AM_CONDITIONAL(USE_ZEROCONF, test "$have_libdns_sd" = "yes")
|
2005-12-19 01:13:38 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl Datadir directory
|
2005-12-19 01:13:38 +00:00
|
|
|
sflphone_datadir=$datadir/sflphone
|
|
|
|
AC_SUBST(sflphone_datadir)
|
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
dnl QT interface
|
2006-05-01 16:37:36 +00:00
|
|
|
AC_MSG_CHECKING([whether to enable sflphoneqt])
|
|
|
|
AC_ARG_ENABLE(sflphoneqt,
|
2006-06-28 23:37:53 +00:00
|
|
|
AS_HELP_STRING(
|
2006-05-01 16:37:36 +00:00
|
|
|
[--disable-sflphoneqt],
|
|
|
|
[disable sflphone-qt compilation @<:@default=no@:>@]
|
|
|
|
),
|
|
|
|
[with_sflphoneqt=$enableval],
|
|
|
|
[with_sflphoneqt=yes]
|
|
|
|
)
|
|
|
|
AM_CONDITIONAL(WITH_QT, test "x$with_sflphoneqt" = "xyes")
|
|
|
|
AM_CONDITIONAL(include_x11, test x$with_sflphoneqt = "xyes")
|
|
|
|
if test "x$with_sflphoneqt" = "xno"; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
2006-06-28 23:37:53 +00:00
|
|
|
gw_CHECK_QT
|
2006-05-01 16:37:36 +00:00
|
|
|
fi
|
2005-12-19 00:11:35 +00:00
|
|
|
|
2006-06-28 23:37:53 +00:00
|
|
|
# Go!
|
|
|
|
AC_SUBST(SFLPHONE_CFLAGS)
|
|
|
|
AC_SUBST(SFLPHONE_LIBS)
|
|
|
|
AC_OUTPUT
|
|
|
|
AC_MSG_NOTICE([[Configuration done! Run `make' to build the software.]])
|