source: mediastreamer2/linphone/configure.in @ 182:f526c16d302a

Last change on this file since 182:f526c16d302a was 182:f526c16d302a, checked in by smorlat <smorlat@…>, 4 years ago
  • added russian translation
  • ui improvements (closes call upon window destroy)
  • detection of symmetric firewalls.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@185 3f6dc0c8-ddfe-455d-9043-3cd528dc4637

File size: 10.3 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT([linphone],[3.0.0],[linphone-developers@nongnu.org])
4
5dnl Source packaging numbers
6
7LINPHONE_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
8LINPHONE_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
9LINPHONE_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
10LINPHONE_EXTRA_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f4)
11
12dnl program extension
13LINPHONE_VERSION=$LINPHONE_MAJOR_VERSION.$LINPHONE_MINOR_VERSION.${LINPHONE_MICRO_VERSION}.${LINPHONE_EXTRA_VERSION}
14
15LIBLINPHONE_SO_VERSION=`expr $LINPHONE_MINOR_VERSION + $LINPHONE_MAJOR_VERSION`:$LINPHONE_MICRO_VERSION:$LINPHONE_MINOR_VERSION
16
17AC_SUBST(LIBLINPHONE_SO_VERSION, $LIBLINPHONE_SO_VERSION)
18AC_SUBST(LINPHONE_VERSION)
19
20AC_MSG_NOTICE([$PACKAGE_NAME-$PACKAGE_VERSION           A full featured audio/video sip phone.])
21AC_MSG_NOTICE([licensed under the terms of the General Public License (GPL)])
22
23AM_INIT_AUTOMAKE([tar-ustar])
24AC_CONFIG_HEADER(config.h)
25
26AC_SUBST([mkdir_p])
27AC_ISC_POSIX
28AC_PROG_CC
29AC_C_INLINE
30AM_PROG_CC_STDC
31AC_HEADER_STDC
32dnl localization tools
33ifdef([IT_PROG_INTLTOOL],[IT_PROG_INTLTOOL],[AC_PROG_INTLTOOL])
34dnl Initialize libtool
35AC_PROG_LIBTOOL
36AM_PROG_LIBTOOL
37AC_ENABLE_SHARED(yes)
38AC_ENABLE_STATIC(no)
39dnl Add the languages which your application supports here.
40PKG_PROG_PKG_CONFIG
41ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru"
42GETTEXT_PACKAGE=linphone
43AM_GNU_GETTEXT([external])
44AC_SUBST(GETTEXT_PACKAGE)
45AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[The name of the gettext package name])
46AC_CHECK_LIB(intl,libintl_gettext)
47
48AC_CHECK_FUNCS([get_current_dir_name strndup stpcpy] )
49
50dnl conditionnal build of console interface.
51AC_ARG_ENABLE(console_ui,
52      [  --enable-console_ui=[yes/no]    Turn on or off compilation of console interface [default=yes]],
53      [case "${enableval}" in
54        yes) console_ui=true ;;
55        no)  console_ui=false ;;
56        *) AC_MSG_ERROR(bad value ${enableval} for --enable-console_ui) ;;
57      esac],[console_ui=true])
58
59dnl conditionnal build of gtk interface.
60AC_ARG_ENABLE(gtk_ui,
61      [  --enable-gtk_ui=[yes/no]    Turn on or off compilation of gtk interface [default=yes]],
62      [case "${enableval}" in
63        yes) gtk_ui=true ;;
64        no)  gtk_ui=false ;;
65        *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk_ui) ;;
66      esac],[gtk_ui=true])
67
68
69if test "$gtk_ui" = "true" ; then
70        PKG_CHECK_MODULES(LIBGTK, gtk+-2.0 >= 2.4.0 gthread-2.0)
71        PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0)
72        AC_SUBST(LIBGTK_CFLAGS)
73        AC_SUBST(LIBGTK_LIBS)
74        AC_SUBST(LIBGLADE_CFLAGS)
75        AC_SUBST(LIBGLADE_LIBS)
76else
77        echo "GTK interface compilation is disabled."
78fi
79
80
81dnl os-specific problems not handled by existing macros.
82case "$host_os" in
83        *freebsd*)
84                LDFLAGS="$LDFLAGS -pthread"
85                ;;
86esac
87
88case "$host_cpu" in
89        *arm*)
90                AC_DEFINE(__ARM__,1,[Defined if we are compiling for arm processor])
91                use_arm_toolchain=yes
92                ;;
93esac
94
95AC_ARG_WITH( realprefix,
96      [  --with-realprefix      Set the real installation prefix. This option has to be used for cross-compilation only. (ex:/usr or /usr/local)[default=none] ],
97      [ realprefix=${withval}],[ realprefix="none" ])
98
99
100
101AC_ARG_ENABLE(manual,
102      [  --disable-manual    Do not attempt to build html linphone's user documentation],
103      [case "${enableval}" in
104        yes) build_manual=yes ;;
105        no)  build_manual=false ;;
106        *) AC_MSG_ERROR(bad value ${enableval} for --enable-manual) ;;
107      esac],[build_manual=yes])
108
109
110dnl enable ipv6 support
111AC_ARG_ENABLE(ipv6,
112      [  --enable-ipv6    Turn on ipv6 support],
113      [case "${enableval}" in
114        yes)  ipv6=true;;
115        no)   ipv6=false;;
116        *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
117      esac],[ipv6=true])
118IPV6_CFLAGS=
119if test x$ipv6 = xtrue ; then
120        IPV6_CFLAGS=-DINET6
121fi
122AC_SUBST(IPV6_CFLAGS)
123
124dnl enable truespeech codec support
125AC_ARG_ENABLE(truespeech,
126      [  --enable-truespeech    Turn on TrueSpeech support (x86 only)],
127      [case "${enableval}" in
128        yes)  truespeech=true;;
129        no)   truespeech=false;;
130        *) AC_MSG_ERROR(bad value ${enableval} for --enable-truespeech) ;;
131      esac],[truespeech=false])
132TRUESPEECH_CFLAGS=
133if test x$truespeech = xtrue ; then
134        TRUESPEECH_CFLAGS=-DTRUESPEECH
135fi
136AC_SUBST(TRUESPEECH_CFLAGS)
137AM_CONDITIONAL([BUILD_TRUESPEECH], [test x$truespeech = xtrue])
138
139
140
141
142dnl support for RSVP (by Vincent Maury)
143AC_ARG_ENABLE(rsvp,
144[  --enable-rsvp           enable support for QoS reservations.],
145AC_DEFINE(VINCENT_MAURY_RSVP,1,[Tell whether RSVP support
146should be compiled.]) )
147
148if test "x${prefix}" = "xNONE"; then
149        prefix=${ac_default_prefix}
150fi
151
152dnl Set PACKAGE_LOCALE_DIR in config.h.
153DATADIRNAME=share
154AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale",[Defines the place where locales can be found])
155
156AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/${DATADIRNAME}",[Defines the place where data are found])
157
158dnl Set PACKAGE_SOUND_DIR in config.h.
159AC_DEFINE_UNQUOTED(PACKAGE_SOUND_DIR, "${prefix}/${DATADIRNAME}/sounds/linphone",[Defines the place where linphone sounds are found])
160
161
162dnl check if we have the getifaddrs() sytem call
163AC_CHECK_FUNCS(getifaddrs)
164
165dnl check for osip2
166LP_CHECK_OSIP2
167
168dnl setup flags for exosip library
169LP_SETUP_EXOSIP
170
171if test "$console_ui" = "true" ; then
172dnl check gnu readline
173LP_CHECK_READLINE
174else
175echo "Console interface compilation is disabled."
176fi
177
178AC_WORDS_BIGENDIAN
179
180dnl normaly this should only by done by mediastreamer2/configure.ac
181dnl but to workaround bugs when cross-compiling for arm-linux,
182dnl we need to have SPEEX_LIBS defined
183dnl Furthermore it is good to repeat here all mediastreamer2 toggles
184dnl since top-level configure --help will not print them.
185
186PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, build_speex=yes)
187AC_SUBST(SPEEX_LIBS)
188
189dnl conditionnal build of video support
190AC_ARG_ENABLE(video,
191                [  --enable-video    Turn on video support compiling],
192                [case "${enableval}" in
193                yes) video=true ;;
194                no)  video=false ;;
195                *) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
196                esac],[video=true])
197               
198AC_ARG_WITH( ffmpeg,
199                [  --with-ffmpeg                Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
200                [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
201
202AC_ARG_WITH( sdl,
203                [  --with-sdl           Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
204                [ libsdldir=${withval}],[ libsdldir=/usr ])
205
206if test "$video" = "true"; then
207        AC_DEFINE(VIDEO_ENABLED,1,[defined if video support is available])
208fi
209
210AC_ARG_ENABLE(alsa,
211      [  --enable-alsa    Turn on alsa native support compiling],
212      [case "${enableval}" in
213        yes) alsa=true ;;
214        no)  alsa=false ;;
215        *) AC_MSG_ERROR(bad value ${enableval} for --enable-alsa) ;;
216      esac],[alsa=true])
217
218AC_ARG_ENABLE(artsc,
219      [  --enable-artsc    Turn on artsc (kde) sound input/output (auto) ],
220      [case "${enableval}" in
221        yes) artsc=true ;;
222        no)  artsc=false ;;
223        *) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
224      esac],[artsc=false])
225
226AC_ARG_ENABLE(portaudio,
227      [  --enable-portaudio    Turn on portaudio native support compiling],
228      [case "${enableval}" in
229        yes) portaudio=true ;;
230        no)  portaudio=false ;;
231        *) AC_MSG_ERROR(bad value ${enableval} for --enable-portaudio) ;;
232      esac],[portaudio=false])
233
234dnl build console if required
235AM_CONDITIONAL(BUILD_CONSOLE, test x$console_ui = xtrue)
236dnl special things for arm-linux cross compilation toolchain
237AM_CONDITIONAL(ARMBUILD, test x$use_arm_toolchain = xyes)
238dnl compilation of gtk-glade user interface
239AM_CONDITIONAL(BUILD_GLADE_UI, [test x$gtk_ui = xtrue ] )
240
241##################################################
242# Stricter build options (after external packages)
243##################################################
244
245
246AC_ARG_ENABLE(strict,
247        AC_HELP_STRING([--enable-strict],
248                       [Build with stricter options (gcc only) @<:@yes@:>@]),[
249        strictness="${enableval}"],[strictness=yes]
250)
251
252if test "$GCC$strictness" = "yesyes" ; then
253        STRICT_OPTIONS="-Wall -Wp,-D_FORTIFY_SOURCE=2"
254        STRICT_OPTIONS="$STRICT_OPTIONS -Werror"
255        CFLAGS="$CFLAGS -fno-strict-aliasing"
256fi
257
258AC_SUBST(STRICT_OPTIONS)
259
260AC_CONFIG_SUBDIRS( mediastreamer2 )
261
262dnl check for db2html (docbook) to generate html user manual
263AC_CHECK_PROG(have_sgmltools,sgmltools, yes, no)
264AM_CONDITIONAL(ENABLE_MANUAL, test x$have_sgmltools$build_manual = xyesyes )
265
266dnl for external use of linphone libs
267LINPHONE_CFLAGS="-I${includedir} -I${includedir}/linphone -I${includedir}/ortp "
268LINPHONE_LIBS="-L${libdir}  -llinphone"
269AC_SUBST(LINPHONE_CFLAGS)
270AC_SUBST(LINPHONE_LIBS)
271
272
273AC_DEFINE_UNQUOTED(LINPHONE_VERSION,"$PACKAGE_VERSION",[Linphone's version number])
274
275
276AC_ARG_ENABLE(external-ortp,
277      [  --enable-external-ortp    Use external oRTP library],
278      [case "${enableval}" in
279        yes) external_ortp=true ;;
280        no)  external_ortp=false ;;
281        *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;;
282      esac],[external_ortp=false])
283
284if test "$external_ortp" = 'true'; then
285        LP_CHECK_ORTP
286else
287        AC_CONFIG_SUBDIRS( oRTP )
288        ORTP_CFLAGS="-I\$(top_srcdir)/oRTP/include"
289        ORTP_LIBS="\$(top_builddir)/oRTP/src/libortp.la"
290        if test x$ac_cv_c_bigendian = xyes ; then
291                ORTP_CFLAGS="$ORTP_CFLAGS -DORTP_BIGENDIAN"
292        fi
293fi
294AC_SUBST(ORTP_CFLAGS)
295AC_SUBST(ORTP_LIBS)
296
297AM_CONDITIONAL(EXTERNAL_ORTP, [test "$external_ortp" = 'true'])
298
299dnl Packaging: Pick oRTP version from ${top_srcdir}/oRTP/configure.ac
300dnl Feel free to propose an alternative & cleaner version...
301top_srcdir=`dirname $0`
302changequote(, )dnl
303ORTP_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/oRTP/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
304MS2_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/mediastreamer2/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
305changequote([, ])dnl
306AC_SUBST([ORTP_VERSION])
307AC_SUBST([MS2_VERSION])
308
309AC_OUTPUT([
310Makefile
311m4/Makefile
312po/Makefile.in
313pixmaps/Makefile
314ipkg/Makefile
315ipkg/linphone.control
316coreapi/Makefile
317gtk-glade/Makefile
318console/Makefile
319share/Makefile
320share/C/Makefile
321share/fr/Makefile
322share/it/Makefile
323share/ja/Makefile
324share/cs/Makefile
325share/linphone.pc
326linphone.spec
327])
328
329echo "Linphone build configuration ended."
330
331if test x$gtk_ui = xtrue ; then
332        echo "* GTK interface will be compiled."
333fi
334if test x$console_ui = xtrue ; then
335        echo "* Console interface will be compiled."
336fi
337
338echo "Now type 'make' to compile, and then 'make install' as root to install it."
Note: See TracBrowser for help on using the repository browser.