1
1
dnl SFLPhone - configure.ac for automake 1.9 and autoconf 2.59
4
3
dnl Process this file with autoconf to produce a configure script.
6
AC_INIT([sflphone],[1.0.1],[sflphoneteam@savoirfairelinux.com],[sflphone])
7
AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011]])
5
AC_INIT([sflphone],[1.0.2],[sflphoneteam@savoirfairelinux.com],[sflphone])
6
AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012]])
8
7
AC_REVISION([$Revision$])
17
16
# Silent build by default. Use make V=1 to increase verbosity
18
17
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
20
dnl Rewrite name of programs to be installed
23
dnl Compute canonical system name
24
dnl AC_CANONICAL_TARGET
26
19
dnl Improve make variable MAKE
29
22
dnl Where to find configure files
30
dnl AC_CONFIG_SRCDIR([config.h.in])
31
23
AC_CONFIG_MACRO_DIR([m4])
33
25
dnl What to generate
34
dnl AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
35
26
AC_CONFIG_FILES([Makefile])
36
27
AC_CONFIG_FILES([libs/Makefile \
37
28
libs/utilspp/Makefile \
53
44
src/hooks/Makefile \
54
45
src/history/Makefile])
56
dnl Unitary test section
47
dnl Unit tests section
57
48
AC_CONFIG_FILES([test/Makefile])
59
50
AC_CONFIG_FILES([ringtones/Makefile])
61
52
AC_CONFIG_FILES([man/Makefile])
63
AC_CONFIG_FILES([doc/Makefile \
64
doc/dbus-api/Makefile \
65
doc/doxygen/Makefile])
54
AC_CONFIG_FILES([doc/Makefile doc/dbus-api/Makefile doc/doxygen/Makefile])
67
56
dnl Check for programs
81
70
dnl Check for header files
84
AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h malloc.h \
85
memory.h netdb.h netinet/in.h stdlib.h string.h strings.h \
86
sys/ioctl.h sys/socket.h sys/time.h unistd.h utime.h ostream])
73
AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h malloc.h memory.h \
74
netdb.h netinet/in.h stdlib.h string.h strings.h \
75
sys/ioctl.h sys/socket.h sys/time.h unistd.h utime.h ostream])
88
77
dnl Check for typedefs, structures, and compiler characteristics
123
112
AC_FUNC_UTIME_NULL
125
114
AC_CHECK_FUNCS([bzero floor gethostbyname gethrtime gettimeofday \
126
inet_ntoa memset mkdir pathconf pow regcomp select setlocale socket \
127
strchr strdup strerror strrchr strstr strtol utime])
115
inet_ntoa memset mkdir pathconf pow regcomp select setlocale \
116
socket strchr strdup strerror strrchr strstr strtol utime])
129
118
dnl Check for GNU ccRTP
130
119
PKG_PROG_PKG_CONFIG
132
dnl Trying to set PJSIP using pkg-config
133
dnl PKG_CHECK_MODULES(SIP, libpj-sfl, have_libpj=true, have_libpj=false)
134
dnl if test "x${have_libpj}" = "xfalse" ; then
135
dnl AC_MSG_ERROR([PJSIP not found. http://www.pjsip.org/download.htm])
137
dnl AC_SUBST(SIP_CFLAGS)
139
121
dnl Check for uuid development package - name: uuid-dev
140
122
UUID_MIN_VERSION=1.0
141
123
PKG_CHECK_MODULES(UUID, uuid >= ${UUID_MIN_VERSION}, HAVE_UUID=true, HAVE_UUID=false);
181
163
CXXFLAGS="${CXXFLAGS} -g -Wno-return-type -Wall -Wextra -Wnon-virtual-dtor -Weffc++ -Wfatal-errors"
183
165
AC_CHECK_LIB([expat], XML_ParserCreate_MM,
184
[AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false)],
166
[AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false)],
187
169
test "$have_expat" = false && AC_MSG_ERROR([libexpat development files missing])
193
175
AC_SUBST(xml_LIBS)
195
177
AC_CHECK_LIB([yaml], yaml_parser_initialize,
196
[AC_CHECK_HEADERS(yaml.h, have_yaml=true, have_yaml=false)],
178
[AC_CHECK_HEADERS(yaml.h, have_yaml=true, have_yaml=false)],
199
181
test "$have_yaml" = "false" && AC_MSG_ERROR([libyaml development files missing])
210
192
test "$have_pthread" = "false" && AC_MSG_ERROR([You need the POSIX Thread library (pthreads)])
213
194
AC_CHECK_LIB([pcre], pcre_free,
214
195
[AC_CHECK_HEADERS(pcre.h, have_pcre=true, have_pcre=false)],
228
209
# check for libgsm1 (doesn't use pkg-config)
229
210
dnl Check for libgsm
231
[AS_HELP_STRING([--without-gsm],
232
[disable support for gsm codec])],
211
AC_ARG_WITH([gsm], [AS_HELP_STRING([--without-gsm],
212
[disable support for gsm codec])], [], [with_gsm=yes])
237
215
AS_IF([test "x$with_gsm" != xno],
268
246
AC_CHECK_HEADER([speex/speex_preprocess.h], , AC_MSG_FAILURE([Unable to find the libspeexdsp headers (you may need to install the libspeexdsp-dev package) used for Noise Suppression and Automatic Gain Control.]))
269
247
AC_CHECK_LIB(speexdsp, speex_preprocess_run, [], [], [])
272
249
# check for libcelt
273
250
AC_ARG_WITH([celt],
274
251
[AS_HELP_STRING([--without-celt],
295
# AC_SUBST(BUILD_CELT)
296
# AM_CONDITIONAL(BUILD_CELT, test "x$with_celt" = "xyes" )
297
272
AM_CONDITIONAL(BUILD_CELT_91, test "x$with_celt_91" = "xyes" )
298
273
AM_CONDITIONAL(BUILD_CELT_71, test "x$with_celt_71" = "xyes" )
301
275
dnl Check for IAX
303
[AS_HELP_STRING([--without-iax2],
304
[disable support for the iax2 protocol])],
276
AC_ARG_WITH([iax2], [AS_HELP_STRING([--without-iax2],
277
[disable support for the iax2 protocol])], [], [with_iax2=yes])
308
279
AC_DEFINE_UNQUOTED([HAVE_IAX], `if test "x$with_iax2" = "xyes"; then echo 1; else echo 0;fi`, [Define if you have libiax2])
309
280
AM_CONDITIONAL(USE_IAX, test "x$with_iax2" = "xyes" )
311
282
dnl Check for network-manager
312
AC_ARG_WITH([networkmanager],
313
[AS_HELP_STRING([--without-networkmanager],
314
[disable support for network-manager events])],
316
[with_networkmanager=yes])
283
AC_ARG_WITH([networkmanager], [AS_HELP_STRING([--without-networkmanager],
284
[disable support for network-manager events])], [],
285
[with_networkmanager=yes])
318
287
AM_CONDITIONAL(USE_NETWORKMANAGER, test "x$with_networkmanager" = "xyes" )