~noskcaj/ubuntu/trusty/ekiga/ftbfs

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-01-28 18:49:20 UTC
  • Revision ID: james.westby@ubuntu.com-20060128184920-v525ihmiv7id40xs
Tags: upstream-1.99.0
ImportĀ upstreamĀ versionĀ 1.99.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT(ekiga, 1.99.0, http://bugzilla.gnome.org/enter_bug.cgi?product=ekiga)
 
2
AC_CANONICAL_TARGET
 
3
AC_PREREQ(2.53)
 
4
AC_CONFIG_SRCDIR(src/gui/main.cpp)
 
5
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
6
 
 
7
AM_MAINTAINER_MODE
 
8
AM_CONFIG_HEADER(config.h)
 
9
 
 
10
 
 
11
dnl ###########################################################################
 
12
dnl   Ekiga/GnomeMeeting Version
 
13
dnl ###########################################################################
 
14
 
 
15
MAJOR_VERSION=1
 
16
MINOR_VERSION=99
 
17
BUILD_TYPE=ReleaseCode
 
18
BUILD_NUMBER=0
 
19
 
 
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])
 
24
 
 
25
 
 
26
dnl ###########################################################################
 
27
dnl Disable GNOME support
 
28
dnl ###########################################################################
 
29
AC_ARG_ENABLE(gnome,
 
30
        [  --disable-gnome        Remove GNOME support. Don't do this, it removes essential features],
 
31
        disable_gnome=yes, disable_gnome=no)
 
32
 
 
33
AC_MSG_CHECKING(whether GNOME support must be compiled in)
 
34
if test x"${disable_gnome}" = xyes && test x"${enable_eds}" = xno; then
 
35
   AC_MSG_RESULT([no])
 
36
else
 
37
   AC_MSG_RESULT([yes])
 
38
fi
 
39
AM_CONDITIONAL(DISABLE_GNOME, test x"${disable_gnome}" = xyes)
 
40
 
 
41
 
 
42
dnl ###########################################################################
 
43
dnl   Gnome-Doc-Utils
 
44
dnl ###########################################################################
 
45
AC_ARG_ENABLE(doc,
 
46
        [  --disable-doc          Do not build documentation.],
 
47
        disable_doc=yes, disable_doc=no)
 
48
 
 
49
AC_MSG_CHECKING(whether documentation should be built)
 
50
if test x"${disable_doc}" = xyes; then
 
51
   AC_MSG_RESULT([no])
 
52
else
 
53
   AC_MSG_RESULT([yes])
 
54
fi
 
55
 
 
56
if test x"${disable_gnome}" = xno && test x"${disable_doc}" = xno; then
 
57
GNOME_DOC_INIT
 
58
else
 
59
ENABLE_SK_TRUE="#"
 
60
ENABLE_SK_FALSE=""
 
61
fi
 
62
 
 
63
AM_CONDITIONAL(DISABLE_DOC, test x"${disable_doc}" = xyes)
 
64
 
 
65
 
 
66
dnl ###########################################################################
 
67
dnl   Misc
 
68
dnl ###########################################################################
 
69
 
 
70
AC_PROG_INTLTOOL([0.20])
 
71
 
 
72
AM_PROG_LIBTOOL
 
73
 
 
74
AC_PROG_CC
 
75
AC_PROG_CXX
 
76
AC_ISC_POSIX
 
77
AC_HEADER_STDC
 
78
 
 
79
AC_CHECK_DECLS(strcasecmp)
 
80
 
 
81
 
 
82
dnl ###########################################################################
 
83
dnl This is to check correct gconf installation
 
84
dnl ###########################################################################
 
85
SCHEMA_AGE=60
 
86
AC_SUBST(SCHEMA_AGE)
 
87
 
 
88
 
 
89
dnl ###########################################################################
 
90
dnl GConf related settings
 
91
dnl ###########################################################################
 
92
if test x"${disable_gnome}" = xyes ; then
 
93
AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, false)
 
94
else
 
95
AM_GCONF_SOURCE_2
 
96
fi
 
97
 
 
98
 
 
99
dnl ###########################################################################
 
100
dnl PKG_CONFIG and required versions
 
101
dnl ###########################################################################
 
102
PKG_PROG_PKG_CONFIG
 
103
 
 
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"
 
107
else
 
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)
 
112
fi
 
113
EKIGA_CFLAGS="$EKIGA_CFLAGS $EDS_CFLAGS"
 
114
EKIGA_LIBS="$EKIGA_LIBS $EDS_LIBS"
 
115
fi
 
116
 
 
117
PWLIB_REC_VERSION="1.9.2"
 
118
OPAL_REC_VERSION="2.1.2"
 
119
 
 
120
 
 
121
dnl ###########################################################################
 
122
dnl Scrollkeeper
 
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)
 
128
fi
 
129
fi
 
130
 
 
131
 
 
132
dnl ###########################################################################
 
133
dnl Set up Operating System specific parameters and endianess
 
134
dnl ###########################################################################
 
135
 
 
136
dnl Check the OS type (more types can be added) 
 
137
AC_MSG_CHECKING(whether OS type is supported)
 
138
win32=0
 
139
 
 
140
case $target_os in
 
141
 
 
142
  solaris*)
 
143
    ARCH_OPAL_CFLAGS="-DPTRACING -DNDEBUG -DSOLARIS -g "
 
144
    ARCH_OPAL_LIBS="-lpt -lopal -ldl -lpthread"
 
145
    AC_MSG_RESULT([yes])
 
146
    gm_platform="solaris"
 
147
    ;;
 
148
 
 
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"
 
152
    AC_MSG_RESULT([yes])
 
153
    gm_platform="linux"
 
154
 
 
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
 
157
    ;;
 
158
 
 
159
  FreeBSD* | freebsd* )
 
160
    ARCH_OPAL_CFLAGS="-DPTRACING -DNDEBUG -Wall -Os -g"
 
161
    ARCH_OPAL_LIBS="-lpt -lopal -lpthread"
 
162
    AC_MSG_RESULT([yes])
 
163
    gm_platform="freebsd"
 
164
    ;;
 
165
 
 
166
  darwin* )
 
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"
 
169
    AC_MSG_RESULT([yes])
 
170
    gm_platform="macosx"
 
171
    ;;
 
172
 
 
173
  mingw* )
 
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])
 
177
    gm_platform="mingw"
 
178
    win32=1
 
179
    ;;
 
180
 
 
181
  *)
 
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.])
 
183
    ;;
 
184
esac
 
185
 
 
186
AM_CONDITIONAL(WIN32, test "x${win32}" = "x1")
 
187
 
 
188
dnl ###########################################################################
 
189
dnl  Check for library path
 
190
dnl ###########################################################################
 
191
case $host in
 
192
 
 
193
*-*-linux*)
 
194
  # Test if the compiler is 64bit
 
195
  echo 'int i;' > conftest.$ac_ext
 
196
  ekiga_cv_cc_64bit_output=no
 
197
 
 
198
  if AC_TRY_EVAL(ac_compile); then
 
199
    case `/usr/bin/file conftest.$ac_objext` in
 
200
 
 
201
    *"ELF 64"*)
 
202
    ekiga_cv_cc_64bit_output=yes      
 
203
    ;;
 
204
    
 
205
    esac
 
206
  fi
 
207
 
 
208
  rm -rf conftest*  
 
209
;;
 
210
esac
 
211
 
 
212
case $host_cpu:$ekiga_cv_cc_64bit_output in
 
213
powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
 
214
libname="lib64"  
 
215
;;
 
216
*:*)  
 
217
libname="lib"  
 
218
;;
 
219
esac
 
220
 
 
221
 
 
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")
 
226
 
 
227
dnl Check for the includes presence
 
228
AC_MSG_CHECKING(for PWLib includes in ${with_pwlib_dir}/include/)
 
229
AC_MSG_RESULT()
 
230
 
 
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"
 
238
        fi      
 
239
fi
 
240
CPPFLAGS="$CPPFLAGS_save"
 
241
 
 
242
if test "x${pwlib_includes}" = "xno" ; then
 
243
        AC_MSG_ERROR(You need the PWLib headers to compile Ekiga)
 
244
fi
 
245
 
 
246
dnl Checking for the library presence
 
247
LIBS_save="$LIBS"
 
248
LIBS="$LIBS -L${with_pwlib_dir}/${libname}/"
 
249
AC_CHECK_LIB(pt, read, pwlib_libs="yes", pwlib_libs="no")
 
250
LIBS="${LIBS_save}"
 
251
 
 
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}"
 
255
        fi
 
256
else
 
257
        AC_MSG_ERROR(You need the PWLib library to compile Ekiga)
 
258
fi
 
259
 
 
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>
 
266
              PWLIB_VERSION 
 
267
             ],AC_MSG_RESULT(${PWLIB_REC_VERSION}), AC_MSG_ERROR(Sorry but the recommended PWLib version is ${PWLIB_REC_VERSION}))
 
268
CPPFLAGS="$CPPFLAGS_save"
 
269
 
 
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);
 
274
AC_EGREP_CPP(1,
 
275
             [#include <ptbuildopts.h>
 
276
              P_LDAP
 
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"
 
280
 
 
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);
 
285
AC_EGREP_CPP(1,
 
286
             [#include <ptbuildopts.h>
 
287
              P_DNS
 
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"
 
291
 
 
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]);
 
296
else
 
297
        AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${with_pwlib_dir}/bin/)
 
298
fi
 
299
ARCH_OPAL_CFLAGS="$ARCH_OPAL_CFLAGS `$PTLIB_CONFIG --ccflags`"
 
300
                  
 
301
 
 
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")
 
306
 
 
307
dnl Check for the includes presence
 
308
AC_MSG_CHECKING(for Opal includes in ${with_opal_dir}/include/)
 
309
AC_MSG_RESULT()
 
310
 
 
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"
 
316
fi
 
317
CPPFLAGS="$CPPFLAGS_save"
 
318
 
 
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"
 
325
fi
 
326
CPPFLAGS="$CPPFLAGS_save"
 
327
fi
 
328
 
 
329
if test "x${opal_includes}" = "xno" ; then
 
330
        AC_MSG_ERROR(You need the Opal headers to compile Ekiga)
 
331
fi
 
332
 
 
333
dnl Checking for the library presence
 
334
LIBS_save="$LIBS"
 
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")
 
337
LIBS="${LIBS_save}"
 
338
 
 
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"
 
342
        fi
 
343
else
 
344
        AC_MSG_ERROR(You need the Opal library to compile Ekiga)
 
345
fi
 
346
 
 
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>
 
353
              OPAL_VERSION 
 
354
             ],AC_MSG_RESULT(${OPAL_REC_VERSION}), AC_MSG_ERROR(Sorry but the recommended OPAL version is ${OPAL_REC_VERSION}))
 
355
CPPFLAGS="$CPPFLAGS_save"
 
356
 
 
357
 
 
358
dnl ###########################################################################
 
359
dnl   Check for SDL and disable-sdl
 
360
dnl ###########################################################################
 
361
 
 
362
AC_ARG_ENABLE(sdl,
 
363
        [  --disable-sdl        Remove SDL support.],
 
364
        disable_sdl=yes, disable_sdl=no)
 
365
 
 
366
AC_MSG_CHECKING(whether SDL support must be compiled in)
 
367
if test x"${disable_sdl}" = xyes ; then
 
368
   AC_MSG_RESULT([no])
 
369
   HAS_SDL="disabled"
 
370
else
 
371
   AC_MSG_RESULT([yes])
 
372
fi
 
373
 
 
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
 
377
        HAS_SDL="disabled"
 
378
        AC_MSG_WARN([*** SDL cannot be used on Mac OS X. Fullscreen mode will be disabled])
 
379
 
 
380
else
 
381
 
 
382
        SDL_VERSION=1.2.4
 
383
        SDL_HAS_SDL=
 
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"
 
389
 
 
390
        if test "x${SDL_HAS_SDL}" = "x-DHAS_SDL" ; then
 
391
                HAS_SDL="enabled"
 
392
        else  
 
393
                HAS_SDL="disabled"
 
394
        fi
 
395
fi
 
396
fi
 
397
 
 
398
 
 
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")
 
403
 
 
404
dnl Check for the includes presence
 
405
dnl AC_MSG_CHECKING(for LDAP includes in ${with_ldap_dir}/include/)
 
406
dnl AC_MSG_RESULT()
 
407
 
 
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"
 
412
        
 
413
dnl if test "x${ldap_includes}" != "xno" ; then
 
414
dnl     LDAP_CFLAGS="-I${with_ldap_dir}/include"
 
415
dnl else
 
416
dnl     AC_MSG_ERROR(You need the LDAP headers to compile Ekiga)
 
417
dnl fi
 
418
 
 
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}"
 
424
 
 
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"
 
429
dnl     fi
 
430
dnl else
 
431
dnl     AC_MSG_ERROR(You need the LDAP library to compile Ekiga)
 
432
dnl fi
 
433
 
 
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"
 
438
dnl fi
 
439
 
 
440
 
 
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)
 
446
 
 
447
 
 
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"
 
455
 
 
456
 
 
457
dnl #########################################################################
 
458
dnl   Check for DBUS
 
459
dnl #########################################################################
 
460
AC_ARG_ENABLE(dbus,
 
461
        [  --enable-dbus       Enable the DBUS component.],
 
462
        enable_dbus=yes, enable_dbus=no)
 
463
 
 
464
AC_MSG_CHECKING(whether the DBUS component should be compiled in)
 
465
if test x"${enable_dbus}" = xyes ; then
 
466
   DBUS="enabled"
 
467
   AC_MSG_RESULT([yes])
 
468
else
 
469
   DBUS="disabled"
 
470
   AC_MSG_RESULT([no])
 
471
fi
 
472
 
 
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)
 
476
   AC_SUBST(DBUS_LIBS)
 
477
   EKIGA_CFLAGS="$EKIGA_CFLAGS $DBUS_CFLAGS -DHAS_DBUS"
 
478
   EKIGA_LIBS="$EKIGA_LIBS $DBUS_LIBS"
 
479
fi
 
480
AM_CONDITIONAL(HAS_DBUS, test x"${enable_dbus}" = xyes)
 
481
AM_CONDITIONAL(DBUS_SERVICES_INSTALL, test x"${enable_dbus}" = xyes)
 
482
 
 
483
 
 
484
dnl #########################################################################
 
485
dnl   Check for Avahi mdns support
 
486
dnl #########################################################################
 
487
AC_ARG_ENABLE(avahi,
 
488
        [--disable-avahi        Disable Avahi support.],
 
489
        disable_avahi=yes, disable_avahi=no)
 
490
 
 
491
AC_MSG_CHECKING(whether Avahi support must be compiled in)
 
492
if test x"${disable_avahi}" = xyes ; then
 
493
   AC_MSG_RESULT([no])
 
494
   HAS_AVAHI="disabled"
 
495
else
 
496
   AC_MSG_RESULT([yes])
 
497
fi
 
498
 
 
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.])
 
504
        HAS_AVAHI="enabled"
 
505
fi
 
506
AM_CONDITIONAL(HAS_AVAHI, test x"${HAS_AVAHI}" = xenabled)
 
507
 
 
508
 
 
509
dnl ###########################################################################
 
510
dnl  The various CFLAGS are merged into EKIGA_CFLAGS and 
 
511
dnl  EKIGA_LIB_CFLAGS
 
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"
 
517
 
 
518
 
 
519
dnl ###########################################################################
 
520
dnl For the static library
 
521
dnl ###########################################################################
 
522
AC_SUBST(EKIGA_LIB_CFLAGS)
 
523
 
 
524
 
 
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"
 
529
 
 
530
GETTEXT_PACKAGE=AC_PACKAGE_NAME
 
531
AC_SUBST(GETTEXT_PACKAGE)
 
532
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[fix])
 
533
AM_GLIB_GNU_GETTEXT
 
534
 
 
535
 
 
536
AC_SUBST(EKIGA_LDADD)
 
537
AC_SUBST(EKIGA_CFLAGS)
 
538
 
 
539
 
 
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])
 
545
else
 
546
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale",[fix])
 
547
fi
 
548
 
 
549
 
 
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)
 
557
                                                                                        
 
558
dnl ###########################################################################
 
559
dnl  Output the different Makefiles
 
560
dnl ###########################################################################
 
561
AC_OUTPUT(
 
562
Makefile
 
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
 
568
lib/Makefile
 
569
lib/about/Makefile
 
570
lib/druid/Makefile
 
571
lib/gmconf/Makefile
 
572
lib/gmcontacts/Makefile
 
573
lib/gui/Makefile
 
574
lib/gui/gmtray/Makefile
 
575
lib/toolbox/Makefile
 
576
po/Makefile.in
 
577
man/Makefile
 
578
src/Makefile
 
579
pixmaps/Makefile
 
580
sounds/Makefile
 
581
help/Makefile)
 
582
 
 
583
dnl ###########################################################################
 
584
dnl Summary
 
585
dnl ###########################################################################
 
586
 
 
587
echo ""
 
588
echo "================ Final configuration ==================="
 
589
echo "          Installing into prefix  :  $prefix"
 
590
echo ""
 
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"
 
596
echo ""
 
597
echo "          SDL Fullscreen support  :  $HAS_SDL"
 
598
echo "                    DBUS support  :  $DBUS"
 
599
echo "             mDNS/DNS-SD support  :  $HAS_AVAHI"
 
600
echo ""
 
601
echo "                         OS Type  :  $target_os"
 
602
echo "                    Machine Type  :  $target_cpu"
 
603
echo ""
 
604
echo " If all settings are OK, type make and make install "
 
605
echo "========================================================"