1
AC_INIT(ekiga, 1.99.0, http://bugzilla.gnome.org/enter_bug.cgi?product=ekiga)
4
AC_CONFIG_SRCDIR(src/gui/main.cpp)
5
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
8
AM_CONFIG_HEADER(config.h)
11
dnl ###########################################################################
12
dnl Ekiga/GnomeMeeting Version
13
dnl ###########################################################################
17
BUILD_TYPE=ReleaseCode
20
AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR_VERSION,[fix])
21
AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION,[fix])
22
AC_DEFINE_UNQUOTED(BUILD_TYPE, $BUILD_TYPE,[fix])
23
AC_DEFINE_UNQUOTED(BUILD_NUMBER, $BUILD_NUMBER,[fix])
26
dnl ###########################################################################
27
dnl Disable GNOME support
28
dnl ###########################################################################
30
[ --disable-gnome Remove GNOME support. Don't do this, it removes essential features],
31
disable_gnome=yes, disable_gnome=no)
33
AC_MSG_CHECKING(whether GNOME support must be compiled in)
34
if test x"${disable_gnome}" = xyes && test x"${enable_eds}" = xno; then
39
AM_CONDITIONAL(DISABLE_GNOME, test x"${disable_gnome}" = xyes)
42
dnl ###########################################################################
44
dnl ###########################################################################
46
[ --disable-doc Do not build documentation.],
47
disable_doc=yes, disable_doc=no)
49
AC_MSG_CHECKING(whether documentation should be built)
50
if test x"${disable_doc}" = xyes; then
56
if test x"${disable_gnome}" = xno && test x"${disable_doc}" = xno; then
63
AM_CONDITIONAL(DISABLE_DOC, test x"${disable_doc}" = xyes)
66
dnl ###########################################################################
68
dnl ###########################################################################
70
AC_PROG_INTLTOOL([0.20])
79
AC_CHECK_DECLS(strcasecmp)
82
dnl ###########################################################################
83
dnl This is to check correct gconf installation
84
dnl ###########################################################################
89
dnl ###########################################################################
90
dnl GConf related settings
91
dnl ###########################################################################
92
if test x"${disable_gnome}" = xyes ; then
93
AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, false)
99
dnl ###########################################################################
100
dnl PKG_CONFIG and required versions
101
dnl ###########################################################################
104
if test x"${disable_gnome}" = xyes; then
105
PKG_CHECK_MODULES(EKIGA, gtk+-2.0 >= 2.4.0 gthread-2.0 >= 2.4.0 libxml-2.0 >= 2.5.0)
106
EKIGA_CFLAGS="$EKIGA_CFLAGS -DDISABLE_GNOME"
108
PKG_CHECK_MODULES(EKIGA, gtk+-2.0 >= 2.4.0 gthread-2.0 >= 2.4.0 esound >= 0.2.28 gconf-2.0 >= 2.2.0 libgnome-2.0 >= 2.2.0 libgnomeui-2.0 >= 2.2.0)
109
PKG_CHECK_MODULES(EDS, libebook-1.2 >= 1.1.3,ebook12=yes,ebook12=no)
110
if test x"${ebook12}" = xno ; then
111
PKG_CHECK_MODULES(EDS, libebook-1.0 >= 0.0.94)
113
EKIGA_CFLAGS="$EKIGA_CFLAGS $EDS_CFLAGS"
114
EKIGA_LIBS="$EKIGA_LIBS $EDS_LIBS"
117
PWLIB_REC_VERSION="1.9.2"
118
OPAL_REC_VERSION="2.1.2"
121
dnl ###########################################################################
123
dnl ###########################################################################
124
if test x"${disable_gnome}" = xno ; then
125
AC_PATH_PROG(SK_CONFIG,scrollkeeper-config,no)
126
if test x$SK_CONFIG = xno; then
127
AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net)
132
dnl ###########################################################################
133
dnl Set up Operating System specific parameters and endianess
134
dnl ###########################################################################
136
dnl Check the OS type (more types can be added)
137
AC_MSG_CHECKING(whether OS type is supported)
143
ARCH_OPAL_CFLAGS="-DPTRACING -DNDEBUG -DSOLARIS -g "
144
ARCH_OPAL_LIBS="-lpt -lopal -ldl -lpthread"
146
gm_platform="solaris"
149
linux-gnu | linux | Linux)
150
ARCH_OPAL_CFLAGS="-DPTRACING -DNDEBUG -Wall -Os -g -fno-exceptions -felide-constructors"
151
ARCH_OPAL_LIBS="-lpt -lopal -ldl -lpthread"
155
dnl if debug add this and link to -lh323_linux_x86_d -lpt_linux_x86_d
156
dnl -D_DEBUG -DPMEMORY_CHECK=1 -DPTRACING -g
159
FreeBSD* | freebsd* )
160
ARCH_OPAL_CFLAGS="-DPTRACING -DNDEBUG -Wall -Os -g"
161
ARCH_OPAL_LIBS="-lpt -lopal -lpthread"
163
gm_platform="freebsd"
167
ARCH_OPAL_CFLAGS="-Os -Wall -DPTRACING -DNDEBUG -DNO_LONG_DOUBLE -DSTATIC_LIBS_USED"
168
ARCH_OPAL_LIBS="-multiply_defined suppress -lh323_Darwin_ppc_r_s -lpt_Darwin_ppc_r_s -lssl -lcrypto -lX11 -framework AudioToolbox -framework CoreAudio -framework CoreServices"
174
ARCH_OPAL_CFLAGS="-Wall -mms-bitfields -DPTRACING -DSTATIC_LIBS_USED"
175
ARCH_OPAL_LIBS="-mwindows -enable-auto-import -enable-runtime-pseudo-reloc -enable-stdcall-fixup -lpt -lopal -lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32"
176
AC_MSG_RESULT([not really])
182
AC_MSG_ERROR([Only Linux, FreeBSD, Solaris and Mac OS X are supported. Please contact the author to know how you can add more OS types.])
186
AM_CONDITIONAL(WIN32, test "x${win32}" = "x1")
188
dnl ###########################################################################
189
dnl Check for library path
190
dnl ###########################################################################
194
# Test if the compiler is 64bit
195
echo 'int i;' > conftest.$ac_ext
196
ekiga_cv_cc_64bit_output=no
198
if AC_TRY_EVAL(ac_compile); then
199
case `/usr/bin/file conftest.$ac_objext` in
202
ekiga_cv_cc_64bit_output=yes
212
case $host_cpu:$ekiga_cv_cc_64bit_output in
213
powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
222
dnl ###########################################################################
223
dnl PWLib Headers and Libraries
224
dnl ###########################################################################
225
AC_ARG_WITH(pwlib-dir, [ --with-pwlib-dir=PFX Location of PWLib], with_pwlib_dir="$withval", with_pwlib_dir="/usr")
227
dnl Check for the includes presence
228
AC_MSG_CHECKING(for PWLib includes in ${with_pwlib_dir}/include/)
231
CPPFLAGS_save="$CPPFLAGS"
232
CPPFLAGS="$CPPFLAGS -I${with_pwlib_dir}/include/ptlib"
233
AC_CHECK_FILE(${with_pwlib_dir}/include/ptlib/pprocess.h, pwlib_includes="yes", pwlib_includes="no")
234
if test "x${pwlib_includes}" != "xno" ; then
235
PWLIB_CFLAGS="-I${with_pwlib_dir}/include/ptlib -I${with_pwlib_dir}/include/ptclib"
236
if test "x${with_pwlib_dir}" != "x/usr"; then
237
PWLIB_CFLAGS="${PWLIB_CFLAGS} -I${with_pwlib_dir}/include"
240
CPPFLAGS="$CPPFLAGS_save"
242
if test "x${pwlib_includes}" = "xno" ; then
243
AC_MSG_ERROR(You need the PWLib headers to compile Ekiga)
246
dnl Checking for the library presence
248
LIBS="$LIBS -L${with_pwlib_dir}/${libname}/"
249
AC_CHECK_LIB(pt, read, pwlib_libs="yes", pwlib_libs="no")
252
if test "x${pwlib_libs}" != "xno"; then
253
if test "x${with_pwlib_dir}" != "x/usr"; then
254
PWLIB_LIBS="-L${with_pwlib_dir}/${libname}"
257
AC_MSG_ERROR(You need the PWLib library to compile Ekiga)
260
dnl Checking for PWLib version
261
CPPFLAGS_save="$CPPFLAGS"
262
CPPFLAGS="$CPPFLAGS $PWLIB_CFLAGS"
263
AC_MSG_CHECKING(for PWLib version);
264
AC_EGREP_CPP(${PWLIB_REC_VERSION},
265
[#include <ptbuildopts.h>
267
],AC_MSG_RESULT(${PWLIB_REC_VERSION}), AC_MSG_ERROR(Sorry but the recommended PWLib version is ${PWLIB_REC_VERSION}))
268
CPPFLAGS="$CPPFLAGS_save"
270
dnl Checking for OpenLDAP support in PWLIB
271
CPPFLAGS_save="$CPPFLAGS"
272
CPPFLAGS="$CPPFLAGS $PWLIB_CFLAGS"
273
AC_MSG_CHECKING(for OpenLDAP support in PWLIB);
275
[#include <ptbuildopts.h>
277
],AC_MSG_RESULT(yes), [ AC_MSG_RESULT(no);
278
AC_MSG_ERROR(Sorry but the PWLib version you are using doesn't support LDAP)])
279
CPPFLAGS="$CPPFLAGS_save"
281
dnl Checking for ENUM support in PWLIB
282
CPPFLAGS_save="$CPPFLAGS"
283
CPPFLAGS="$CPPFLAGS $PWLIB_CFLAGS"
284
AC_MSG_CHECKING(for ENUM support in PWLIB);
286
[#include <ptbuildopts.h>
288
],AC_MSG_RESULT(yes), [ AC_MSG_RESULT(no);
289
AC_MSG_ERROR(Sorry but the PWLib version you are using doesn't support ENUM)])
290
CPPFLAGS="$CPPFLAGS_save"
292
dnl Check for ptlib-config
293
AC_CHECK_FILE(${with_pwlib_dir}/bin/ptlib-config, HAS_PTLIB_CONFIG=1)
294
if test "x${HAS_PTLIB_CONFIG}" != "x1" ; then
295
AC_MSG_ERROR([Sorry but ptlib-config can not be found, please check your installation]);
297
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${with_pwlib_dir}/bin/)
299
ARCH_OPAL_CFLAGS="$ARCH_OPAL_CFLAGS `$PTLIB_CONFIG --ccflags`"
302
dnl ###########################################################################
303
dnl Opal Headers and Libraries
304
dnl ###########################################################################
305
AC_ARG_WITH(opal-dir, [ --with-opal-dir=PFX Location of Opal], with_opal_dir="$withval", with_opal_dir="/usr")
307
dnl Check for the includes presence
308
AC_MSG_CHECKING(for Opal includes in ${with_opal_dir}/include/)
311
CPPFLAGS_save="$CPPFLAGS"
312
CPPFLAGS="$CPPFLAGS -I${with_opal_dir}/include/opal"
313
AC_CHECK_FILE(${with_opal_dir}/include/opal/opal/call.h, opal_includes="yes", opal_includes="no")
314
if test "x${opal_includes}" != "xno" ; then
315
OPAL_CFLAGS="-I${with_opal_dir}/include/opal"
317
CPPFLAGS="$CPPFLAGS_save"
319
if test "x${opal_includes}" = "xno" ; then
320
CPPFLAGS_save="$CPPFLAGS"
321
CPPFLAGS="$CPPFLAGS -I${with_opal_dir}/include"
322
AC_CHECK_FILE(${with_opal_dir}/include/opal/call.h, opal_includes="yes", opal_includes="no")
323
if test "x${opal_includes}" != "xno" ; then
324
OPAL_CFLAGS="-I${with_opal_dir}/include"
326
CPPFLAGS="$CPPFLAGS_save"
329
if test "x${opal_includes}" = "xno" ; then
330
AC_MSG_ERROR(You need the Opal headers to compile Ekiga)
333
dnl Checking for the library presence
335
LIBS="${LIBS} -L${with_opal_dir}/${libname}/ -L${with_pwlib_dir}/${libname}/ -lpt"
336
AC_CHECK_LIB(opal, main, opal_libs="yes", opal_libs="yes")
339
if test "x${opal_libs}" != "xno"; then
340
if test "x${with_opal_dir}" != "x/usr"; then
341
OPAL_LIBS="-L${with_opal_dir}/lib"
344
AC_MSG_ERROR(You need the Opal library to compile Ekiga)
347
dnl Checking for Opal version
348
CPPFLAGS_save="$CPPFLAGS"
349
CPPFLAGS="$CPPFLAGS $OPAL_CFLAGS"
350
AC_MSG_CHECKING(for Opal version);
351
AC_EGREP_CPP(${OPAL_REC_VERSION},
352
[#include <opal/buildopts.h>
354
],AC_MSG_RESULT(${OPAL_REC_VERSION}), AC_MSG_ERROR(Sorry but the recommended OPAL version is ${OPAL_REC_VERSION}))
355
CPPFLAGS="$CPPFLAGS_save"
358
dnl ###########################################################################
359
dnl Check for SDL and disable-sdl
360
dnl ###########################################################################
363
[ --disable-sdl Remove SDL support.],
364
disable_sdl=yes, disable_sdl=no)
366
AC_MSG_CHECKING(whether SDL support must be compiled in)
367
if test x"${disable_sdl}" = xyes ; then
374
if test x"${disable_sdl}" = xno ; then
375
dnl SDL does not work on Mac OS X yet, so disable it
376
if test ${gm_platform} = "macosx" ; then
378
AC_MSG_WARN([*** SDL cannot be used on Mac OS X. Fullscreen mode will be disabled])
384
AM_PATH_SDL($SDL_VERSION,
385
SDL_HAS_SDL="-DHAS_SDL",
386
AC_MSG_WARN([*** SDL version $SDL_VERSION not found!. Fullscreen mode will be disabled]))
387
SDL_CFLAGS="$SDL_CFLAGS $SDL_HAS_SDL"
388
SDL_LDFLAGS="$LIBS $SDL_LIBS"
390
if test "x${SDL_HAS_SDL}" = "x-DHAS_SDL" ; then
399
dnl ###########################################################################
400
dnl LDAP Headers and Libraries
401
dnl ###########################################################################
402
dnl AC_ARG_WITH(ldap-dir, [ --with-ldap-dir=PFX Location of LDAP], with_ldap_dir="$withval", with_ldap_dir="/usr")
404
dnl Check for the includes presence
405
dnl AC_MSG_CHECKING(for LDAP includes in ${with_ldap_dir}/include/)
408
dnl CPPFLAGS_save="$CPPFLAGS"
409
dnl CPPFLAGS="$CPPFLAGS -I${with_ldap_dir}/include"
410
dnl AC_CHECK_FILE(${with_ldap_dir}/include/ldap.h, ldap_includes="yes", ldap_includes="no")
411
dnl CPPFLAGS="$CPPFLAGS_save"
413
dnl if test "x${ldap_includes}" != "xno" ; then
414
dnl LDAP_CFLAGS="-I${with_ldap_dir}/include"
416
dnl AC_MSG_ERROR(You need the LDAP headers to compile Ekiga)
419
dnl Checking for the library presence
420
dnl LIBS_save="$LIBS"
421
dnl LIBS="${LIBS} -L${with_ldap_dir}/${libname}/ -llber"
422
dnl AC_CHECK_LIB(ldap, main, ldap_libs="yes", ldap_libs="no")
423
dnl LIBS="${LIBS_save}"
425
dnl if test "x${ldap_libs}" != "xno"; then
426
dnl LDAP_LIBS="-llber -lldap"
427
dnl if test "x${with_ldap_dir}" != "x/usr"; then
428
dnl LDAP_LIBS="-L${with_ldap_dir}/${libname} $LDAP_LIBS"
431
dnl AC_MSG_ERROR(You need the LDAP library to compile Ekiga)
434
dnl Checking for libresolv
435
dnl if test ${gm_platform} = "linux" ; then
436
dnl AC_CHECK_LIB(resolv, res_gethostbyaddr, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([*** libresolv not found.]), -lresolv)
437
dnl LDAP_LIBS="${LDAP_LIBS} -lresolv"
441
dnl #########################################################################
442
dnl Check for recent libxml2 which has xmlRegisterNodeDefault()
443
dnl ########################################################################
444
dnl AC_CHECK_LIB(xml2, xmlFreeDoc)
445
dnl AC_CHECK_FUNCS(xmlRegisterNodeDefault)
448
dnl ########################################################################
449
dnl libxml path is in EKIGA_CFLAGS due to pkg-config
450
dnl ########################################################################
451
dnl CPPFLAGS_save="$CPPFLAGS"
452
dnl CPPFLAGS="$CPPFLAGS $EKIGA_CFLAGS"
453
dnl AC_CHECK_TYPES(xmlSAXHandlerV1,,, [#include <libxml/SAX.h>])
454
dnl CPPFLAGS="$CPPFLAGS_save"
457
dnl #########################################################################
459
dnl #########################################################################
461
[ --enable-dbus Enable the DBUS component.],
462
enable_dbus=yes, enable_dbus=no)
464
AC_MSG_CHECKING(whether the DBUS component should be compiled in)
465
if test x"${enable_dbus}" = xyes ; then
473
if test x"${enable_dbus}" = xyes ; then
474
PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.36 dbus-glib-1 >= 0.36)
475
AC_SUBST(DBUS_CFLAGS)
477
EKIGA_CFLAGS="$EKIGA_CFLAGS $DBUS_CFLAGS -DHAS_DBUS"
478
EKIGA_LIBS="$EKIGA_LIBS $DBUS_LIBS"
480
AM_CONDITIONAL(HAS_DBUS, test x"${enable_dbus}" = xyes)
481
AM_CONDITIONAL(DBUS_SERVICES_INSTALL, test x"${enable_dbus}" = xyes)
484
dnl #########################################################################
485
dnl Check for Avahi mdns support
486
dnl #########################################################################
488
[--disable-avahi Disable Avahi support.],
489
disable_avahi=yes, disable_avahi=no)
491
AC_MSG_CHECKING(whether Avahi support must be compiled in)
492
if test x"${disable_avahi}" = xyes ; then
499
if test x"${disable_avahi}" = x"no"; then
500
PKG_CHECK_MODULES(AVAHI, avahi-client >= 0.6 avahi-glib >= 0.6)
501
EKIGA_CFLAGS="$EKIGA_CFLAGS $AVAHI_CFLAGS -DHAS_AVAHI"
502
EKIGA_LIBS="$EKIGA_LIBS $AVAHI_LIBS"
503
AC_DEFINE(HAS_AVAHI, 1, [Define if Avahi support is enabled.])
506
AM_CONDITIONAL(HAS_AVAHI, test x"${HAS_AVAHI}" = xenabled)
509
dnl ###########################################################################
510
dnl The various CFLAGS are merged into EKIGA_CFLAGS and
512
dnl ###########################################################################
513
EKIGA_CFLAGS="$EKIGA_CFLAGS $LDAP_CFLAGS"
514
EKIGA_LIB_CFLAGS="$EKIGA_CFLAGS"
515
EKIGA_CFLAGS="$EKIGA_CFLAGS $PWLIB_CFLAGS $LDAP_INCLUDES $OPAL_CFLAGS $SDL_CFLAGS $LDAP_CFLAGS $ARCH_OPAL_CFLAGS"
516
EKIGA_LIBS="$PWLIB_LIBS $OPAL_LIBS $EKIGA_LIBS $LDAP_LIBS $SDL_LDFLAGS $ARCH_OPAL_LIBS"
519
dnl ###########################################################################
520
dnl For the static library
521
dnl ###########################################################################
522
AC_SUBST(EKIGA_LIB_CFLAGS)
525
dnl #########################################################################
526
dnl Support for internationalization
527
dnl ########################################################################
528
ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja ko lt lv mk ml mn mr ms nb ne nl no pa pl pt pt_BR ro ru rw sk sq sr sr@Latn sv ta th tr uk vi wa xh zh_CN zh_HK zh_TW"
530
GETTEXT_PACKAGE=AC_PACKAGE_NAME
531
AC_SUBST(GETTEXT_PACKAGE)
532
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[fix])
536
AC_SUBST(EKIGA_LDADD)
537
AC_SUBST(EKIGA_CFLAGS)
540
dnl #########################################################################
541
dnl Set PACKAGE_LOCALE_DIR in config.h.
542
dnl #########################################################################
543
if test "x${prefix}" = "xNONE"; then
544
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale",[fix])
546
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale",[fix])
550
dnl ###########################################################################
551
dnl Data and configuration directories for the system
552
dnl ###########################################################################
553
gnomedatadir=`eval "echo ${datadir}"`
554
gnomeconfdir=`eval "echo ${sysconfdir}"`
555
AC_SUBST(gnomedatadir)
556
AC_SUBST(gnomeconfdir)
558
dnl ###########################################################################
559
dnl Output the different Makefiles
560
dnl ###########################################################################
563
src/ekiga-config-tool
564
AC_PACKAGE_NAME.schemas.in
565
AC_PACKAGE_NAME.desktop.in
566
net.ekiga.instance.service
567
net.ekiga.helper.service
572
lib/gmcontacts/Makefile
574
lib/gui/gmtray/Makefile
583
dnl ###########################################################################
585
dnl ###########################################################################
588
echo "================ Final configuration ==================="
589
echo " Installing into prefix : $prefix"
591
echo " OPAL Version is : $OPAL_REC_VERSION"
592
echo " OPAL Directory is : $with_opal_dir"
593
echo " PWLIB Version is : $PWLIB_REC_VERSION"
594
echo " PWLIB Directory is : $with_pwlib_dir"
595
echo " ptlib-config is : $with_pwlib_dir/bin/ptlib-config"
597
echo " SDL Fullscreen support : $HAS_SDL"
598
echo " DBUS support : $DBUS"
599
echo " mDNS/DNS-SD support : $HAS_AVAHI"
601
echo " OS Type : $target_os"
602
echo " Machine Type : $target_cpu"
604
echo " If all settings are OK, type make and make install "
605
echo "========================================================"