~ubuntu-branches/ubuntu/trusty/ekiga/trusty

« back to all changes in this revision

Viewing changes to .pc/powerpcspe.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Eugen Dedu, Eugen Dedu, Emilio Pozuelo Monfort
  • Date: 2014-01-18 11:28:19 UTC
  • mfrom: (7.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20140118112819-oupqta6qugwsrgyo
Tags: 4.0.1-3
[ Eugen Dedu ]
* Install README.security in doc directory (Closes: #712033)
* Fix debian svn/vcs information
* Fix FTBFS on powerpcspe (Closes: 701565)
* Fix FTBFS with recent boost libraries (Closes: 735791)

[ Emilio Pozuelo Monfort ]
* debian/rules:
  + Disable silent rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT([ekiga],[4.0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=ekiga])
 
2
 
 
3
AC_CANONICAL_TARGET
 
4
AC_PREREQ([2.53])
 
5
AC_CONFIG_MACRO_DIR([m4])
 
6
AC_CONFIG_SRCDIR(src/ekiga.cpp)
 
7
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
 
8
 
 
9
AM_MAINTAINER_MODE([enable])
 
10
AC_CONFIG_HEADERS([config.h])
 
11
 
 
12
dnl use "make V=1" if you want to see the long awful lines
 
13
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
14
 
 
15
AC_LANG(C++)
 
16
 
 
17
dnl ###########################################################################
 
18
dnl   Definitions
 
19
dnl ###########################################################################
 
20
 
 
21
MAJOR_VERSION=4
 
22
MINOR_VERSION=0
 
23
BUILD_TYPE=ReleaseCode
 
24
BUILD_NUMBER=1
 
25
 
 
26
PTLIB_REC_VERSION="2.10.10"
 
27
OPAL_REC_VERSION="3.10.10"
 
28
 
 
29
AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR_VERSION,[fix])
 
30
AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION,[fix])
 
31
AC_DEFINE_UNQUOTED(BUILD_TYPE, $BUILD_TYPE,[fix])
 
32
AC_DEFINE_UNQUOTED(BUILD_NUMBER, $BUILD_NUMBER,[fix])
 
33
 
 
34
dnl ###########################################################################
 
35
dnl   Disable / Enable Main Ekiga Components
 
36
dnl ###########################################################################
 
37
 
 
38
PKG_PROG_PKG_CONFIG
 
39
 
 
40
LT_INIT([dlopen disable-static])
 
41
 
 
42
AC_PROG_CC_C99
 
43
AC_PROG_CXX
 
44
AC_SEARCH_LIBS([strerror],[cposix])
 
45
AC_HEADER_STDC
 
46
 
 
47
dnl Enable compiler warnings
 
48
if test ".$ac_cv_c_compiler_gnu" = .yes; then
 
49
   CFLAGS="$CFLAGS -Wall -Wextra -Winit-self -Wswitch-default -Wswitch-enum -Wstrict-aliasing=2 -Wfloat-equal -Wshadow"
 
50
   CXXFLAGS="$CXXFLAGS -Wall -Wextra -Winit-self -Wswitch-default -Wswitch-enum -Wstrict-aliasing=2 -Wfloat-equal -Wshadow"
 
51
fi
 
52
 
 
53
dnl Check the library path
 
54
case $host in
 
55
 
 
56
  *-*-linux*)
 
57
    # Test if the compiler is 64bit
 
58
    echo 'int i;' > conftest.$ac_ext
 
59
    ekiga_cv_cc_64bit_output=no
 
60
 
 
61
    if AC_TRY_EVAL(ac_compile); then
 
62
      case `/usr/bin/file conftest.$ac_objext` in
 
63
        *"ELF 64"*)
 
64
          ekiga_cv_cc_64bit_output=yes
 
65
          ;;
 
66
      esac
 
67
    fi
 
68
    rm -rf conftest*
 
69
  ;;
 
70
esac
 
71
 
 
72
case $host_cpu:$ekiga_cv_cc_64bit_output in
 
73
 
 
74
  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
 
75
    libname="lib64"
 
76
    ;;
 
77
 
 
78
  *:*)
 
79
    libname="lib"
 
80
    ;;
 
81
esac
 
82
 
 
83
dnl Check the OS type (more types can be added)
 
84
AC_MSG_CHECKING(whether OS type is supported)
 
85
win32=0
 
86
 
 
87
case $target_os in
 
88
 
 
89
  solaris*)
 
90
    gm_platform="solaris"
 
91
    ;;
 
92
 
 
93
  linux-gnulp | linux-gnu | linux-gnueabi* | linux | Linux)
 
94
    gm_platform="linux"
 
95
    ;;
 
96
 
 
97
  gnu* )
 
98
    gm_platform="gnu"
 
99
    ;;
 
100
 
 
101
  FreeBSD* | freebsd* | kfreebsd* | NetBSD* | netbsd* )
 
102
    gm_platform="freebsd"
 
103
    ;;
 
104
 
 
105
  darwin* )
 
106
    gm_platform="macosx"
 
107
    ;;
 
108
 
 
109
  mingw* )
 
110
    gm_platform="mingw"
 
111
    CFLAGS="$CFLAGS -Wl,--enable-auto-import"
 
112
    CXXFLAGS="$CXXFLAGS -Wl,--enable-auto-import"
 
113
    win32=1
 
114
    ;;
 
115
 
 
116
  *)
 
117
    AC_MSG_ERROR([Only Linux, Hurd, FreeBSD, NetBSD, Solaris and Mac OS X are supported. Please contact the author to know how you can add more OS types.])
 
118
    ;;
 
119
esac
 
120
AC_MSG_RESULT([yes])
 
121
 
 
122
AM_CONDITIONAL(WIN32, test "x${win32}" = "x1")
 
123
 
 
124
dnl Check the byte order
 
125
AC_MSG_CHECKING(Byte order)
 
126
byte_order="unknown"
 
127
AC_ARG_WITH([endianess],
 
128
            [AS_HELP_STRING([--with-endianess=big|little],[endianess of target system])],
 
129
            [byte_order="$withval endian"],
 
130
            [AC_C_BIGENDIAN([byte_order="big endian"], [byte_order="little endian"], [])])
 
131
 
 
132
if test "x$byte_order" = "xbig endian"; then
 
133
    AC_DEFINE(WORDS_BIGENDIAN,1,[Big Endian Architecture])
 
134
else
 
135
    if test "x$byte_order" = "xlittle endian"; then
 
136
        AC_DEFINE(WORDS_LITTLEENDIAN,1,[Little Endian Architecture])
 
137
    else
 
138
      AC_MSG_ERROR([Unable to detect endianess of target system - please specify])
 
139
    fi
 
140
fi
 
141
 
 
142
AC_MSG_RESULT([$byte_order])
 
143
 
 
144
 
 
145
dnl ###############################
 
146
dnl   Mandatory intltool support
 
147
dnl ###############################
 
148
IT_PROG_INTLTOOL([0.35.0])
 
149
 
 
150
 
 
151
dnl ###############################
 
152
dnl   Mandatory GTK+ support
 
153
dnl ###############################
 
154
# on Windows the icons are manually copied in the installer
 
155
if test "x${gm_platform}" = "xmingw" ; then
 
156
   PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.20.0])
 
157
else
 
158
   PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.20.0 gnome-icon-theme >= 3.0.0])
 
159
fi
 
160
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.24.0 gmodule-2.0 gobject-2.0 gthread-2.0])
 
161
AC_ARG_ENABLE([gtk-debug],
 
162
              [AS_HELP_STRING([--enable-gtk-debug],[enable GTK+ debug flags (default is disabled)])],
 
163
              [if test "x$enableval" = "xyes"; then
 
164
                GTK_CFLAGS="$GTK_CFLAGS -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
 
165
                GLIB_CFLAGS="$GLIB_CFLAGS -DG_DISABLE_SINGLE_INCLUDES"
 
166
              fi])
 
167
AC_SUBST(GTK_CFLAGS)
 
168
AC_SUBST(GTK_LIBS)
 
169
AC_SUBST(GLIB_CFLAGS)
 
170
AC_SUBST(GLIB_LIBS)
 
171
 
 
172
 
 
173
dnl ###############################
 
174
dnl   Mandatory BOOST support
 
175
dnl ###############################
 
176
AX_BOOST_BASE([1.34])
 
177
AX_BOOST_SIGNALS
 
178
 
 
179
if test "x${ax_cv_boost_signals}" == "xno"; then
 
180
   AC_MSG_ERROR([You need the boost signals library to compile Ekiga])
 
181
fi
 
182
 
 
183
BOOST_LIBS="${BOOST_SIGNALS_LIB}"
 
184
AC_SUBST(BOOST_LIBS)
 
185
 
 
186
 
 
187
dnl ###############################
 
188
dnl   Mandatory libXML support
 
189
dnl ###############################
 
190
PKG_CHECK_MODULES([XML], [libxml-2.0])
 
191
AC_SUBST(XML_CFLAGS)
 
192
AC_SUBST(XML_LIBS)
 
193
 
 
194
 
 
195
dnl ###############################
 
196
dnl   GConf support
 
197
dnl ###############################
 
198
GCONF="disabled"
 
199
 
 
200
if test "x${gm_platform}" != "xmingw" ; then
 
201
  AC_ARG_ENABLE(gconf, AS_HELP_STRING([--enable-gconf],[enable GConf support (default is enabled)]),
 
202
[if test "x$enableval" = "xyes"; then
 
203
  enable_gconf = yes
 
204
fi],enable_gconf=yes)
 
205
 
 
206
  if test "x$enable_gconf" = "xyes"; then
 
207
    PKG_CHECK_MODULES([GCONF], [gconf-2.0 >= 2.6.0], [found_gconf=yes])
 
208
    AM_GCONF_SOURCE_2
 
209
    AC_SUBST(GCONF_CFLAGS)
 
210
    AC_SUBST(GCONF_LIBS)
 
211
    GCONF="enabled"
 
212
    AC_DEFINE(HAVE_GCONF,1,[GConf support])
 
213
  else
 
214
    AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, false)
 
215
  fi
 
216
else
 
217
  AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, false)
 
218
fi
 
219
 
 
220
AM_CONDITIONAL(HAVE_GCONF, test "x$found_gconf" = "xyes")
 
221
 
 
222
 
 
223
dnl ###############################
 
224
dnl   Evolution-data-server support
 
225
dnl ###############################
 
226
EDS="disabled"
 
227
 
 
228
if test "x${gm_platform}" != "xmingw" ; then
 
229
  AC_ARG_ENABLE(eds, AS_HELP_STRING([--enable-eds],[enable evolution-data-server addressbook support (default is enabled)]),
 
230
[if test "x$enableval" = "xyes"; then
 
231
  enable_eds=yes
 
232
fi],enable_eds=yes)
 
233
 
 
234
  if test "x$enable_eds" = "xyes"; then
 
235
    PKG_CHECK_MODULES([EDS], [libebook-1.2], [found_eds=yes])
 
236
    AC_SUBST(EDS_CFLAGS)
 
237
    AC_SUBST(EDS_LIBS)
 
238
    EDS="enabled"
 
239
    AC_DEFINE(HAVE_EDS,1,[EDS support])
 
240
  fi
 
241
fi
 
242
 
 
243
AM_CONDITIONAL(HAVE_EDS, test "x$found_eds" = "xyes")
 
244
 
 
245
 
 
246
dnl ###############################
 
247
dnl   NOTIFY support
 
248
dnl ###############################
 
249
NOTIFY="disabled"
 
250
 
 
251
if test "x${gm_platform}" != "xmingw" ; then
 
252
  AC_ARG_ENABLE(notify, AS_HELP_STRING([--enable-notify],[enable libnotify support (default is enabled)]),
 
253
[if test "x$enableval" = "xyes"; then
 
254
  enable_notify=yes
 
255
fi],enable_notify=yes)
 
256
 
 
257
  if test "x$enable_notify" = "xyes"; then
 
258
    PKG_CHECK_MODULES([NOTIFY], [libnotify], [found_notify=yes], foo=bar)
 
259
    if test "x$found_notify" = "xyes"; then
 
260
      AC_SUBST(NOTIFY_CFLAGS)
 
261
      AC_SUBST(NOTIFY_LIBS)
 
262
      NOTIFY="enabled"
 
263
      AC_DEFINE(HAVE_NOTIFY,1,[NOTIFY support])
 
264
    fi
 
265
  fi
 
266
fi
 
267
 
 
268
AM_CONDITIONAL(HAVE_NOTIFY, test "x$found_notify" = "xyes")
 
269
 
 
270
 
 
271
dnl ###############################
 
272
dnl   LDAP support
 
273
dnl ###############################
 
274
LDAP="disabled"
 
275
 
 
276
AC_ARG_ENABLE(ldap, AS_HELP_STRING([--enable-ldap],[enable LDAP addressbook support (default is enabled)]),
 
277
[if test "x$enableval" = "xyes"; then
 
278
  enable_ldap=yes
 
279
fi],enable_ldap=yes)
 
280
 
 
281
if test "x$enable_ldap" = "xyes"; then
 
282
 
 
283
  AC_ARG_WITH(ldap-dir, AS_HELP_STRING([--with-ldap-dir=PFX],[location of LDAP]), with_ldap_dir="$withval", with_ldap_dir="/usr")
 
284
 
 
285
  dnl Check for the includes presence
 
286
  AC_MSG_CHECKING(for LDAP includes in ${with_ldap_dir}/include/)
 
287
  AC_MSG_RESULT()
 
288
 
 
289
 
 
290
  if test -f ${with_ldap_dir}/include/ldap.h; then
 
291
        LDAP_CFLAGS="-I${with_ldap_dir}/include"
 
292
  else
 
293
        AC_MSG_ERROR([You need the LDAP headers to compile Ekiga with LDAP support])
 
294
  fi
 
295
 
 
296
  dnl Checking for the library presence
 
297
  LIBS_save="$LIBS"
 
298
  LIBS="${LIBS} -L${with_ldap_dir}/${libname}/ -llber"
 
299
  AC_CHECK_LIB(ldap, main, ldap_libs="yes", ldap_libs="no")
 
300
  LIBS="${LIBS_save}"
 
301
 
 
302
  if test "x${ldap_libs}" != "xno"; then
 
303
        LDAP_LIBS="-llber -lldap"
 
304
        if test "x${with_ldap_dir}" != "x/usr"; then
 
305
                LDAP_LIBS="-L${with_ldap_dir}/${libname} $LDAP_LIBS"
 
306
        fi
 
307
  else
 
308
        AC_MSG_ERROR([You need the LDAP library to compile Ekiga with LDAP support])
 
309
  fi
 
310
 
 
311
  dnl Checking for libsasl2
 
312
  AC_ARG_WITH(libsasl2-dir, AS_HELP_STRING([--with-libsasl2-dir=PFX],[location of LIBSASL2]), with_libsasl2_dir="$withval", with_libsasl2_dir="/usr")
 
313
 
 
314
  dnl Check for the libsasl2 includes presence
 
315
  AC_MSG_CHECKING(for LIBSASL2 includes in ${with_libsasl2_dir}/include/)
 
316
  AC_MSG_RESULT()
 
317
 
 
318
  if test -f ${with_libsasl2_dir}/include/sasl/sasl.h; then
 
319
        LDAP_CFLAGS="${LDAP_CFLAGS} -I${with_libsasl2_dir}/include"
 
320
  else
 
321
        AC_MSG_ERROR([You need the SASL2 library to compile Ekiga])
 
322
  fi
 
323
  LDAP_LIBS="$LDAP_LIBS -lsasl2"
 
324
 
 
325
  dnl Checking for libresolv
 
326
  if test ${gm_platform} = "linux" ; then
 
327
        AC_CHECK_LIB(resolv, res_gethostbyaddr, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([You need the libresolv library to compile Ekiga]), -lresolv)
 
328
        LDAP_LIBS="${LDAP_LIBS} -lresolv"
 
329
  fi
 
330
  found_ldap="yes"
 
331
  AC_SUBST(LDAP_CFLAGS)
 
332
  AC_SUBST(LDAP_LIBS)
 
333
  LDAP="enabled"
 
334
  AC_DEFINE(HAVE_LDAP,1,[LDAP support])
 
335
fi
 
336
 
 
337
AM_CONDITIONAL(HAVE_LDAP, test "x$found_ldap" = "xyes")
 
338
 
 
339
 
 
340
AM_PROG_AS
 
341
 
 
342
dnl ###############################
 
343
dnl Checks for MMX support
 
344
dnl ###############################
 
345
AC_MSG_CHECKING(for x86 platform)
 
346
case $host_cpu in
 
347
  i386|i486|i586|i686|i786|k6|k7)
 
348
        AC_ARG_ENABLE(mmx, AS_HELP_STRING([--enable-mmx],[enable MMX acceleration (default is enabled)]), [if test "x$enableval" = "xyes"; then
 
349
                             use_x86_asm=yes
 
350
                           else
 
351
                             use_x86_asm=no
 
352
                           fi], use_x86_asm=yes)
 
353
        ;;
 
354
   *)
 
355
        use_x86_asm=no
 
356
esac
 
357
AC_MSG_RESULT($use_x86_asm)
 
358
 
 
359
use_mmx_asm=no
 
360
if test "x$use_x86_asm" = "xyes"; then
 
361
    save_ac_ext=$ac_ext
 
362
    ac_ext=S
 
363
 
 
364
    AC_MSG_CHECKING(compiler support for MMX)
 
365
    cp $srcdir/lib/pixops/scale_line_22_33_mmx.S conftest.S
 
366
    if AC_TRY_EVAL(ac_compile); then
 
367
        use_mmx_asm=yes
 
368
    fi
 
369
 
 
370
    rm -rf conftest*
 
371
 
 
372
    ac_ext=$save_ac_ext
 
373
    if test "x$use_mmx_asm" = "xyes"; then
 
374
      AC_DEFINE([USE_MMX], 1, [MMX Support])
 
375
      AC_MSG_RESULT(yes)
 
376
    else
 
377
      AC_MSG_RESULT(no)
 
378
    fi
 
379
fi
 
380
 
 
381
AM_CONDITIONAL(USE_MMX, test "x$use_mmx_asm" = "xyes")
 
382
 
 
383
 
 
384
 
 
385
dnl ###############################
 
386
dnl Checks for Shared Memory extension
 
387
dnl ###############################
 
388
SHM="disabled"
 
389
 
 
390
if test "x${gm_platform}" = "xlinux" ; then
 
391
  AC_ARG_ENABLE(shm, AS_HELP_STRING([--enable-shm],[enable SHM support (default is enabled)]),
 
392
[if test "x$enableval" = "xyes"; then
 
393
  enable_shm=yes
 
394
fi],enable_shm=yes)
 
395
  if test "x$enable_shm" = "xyes"; then
 
396
    AC_CHECK_LIB(Xext, XShmAttach, with_shm="yes", with_shm="no")
 
397
    if test "x${with_shm}" != "xno"; then
 
398
      SHM="enabled"
 
399
      AC_DEFINE(HAVE_SHM,1,[SHM Support])
 
400
      SHM_LIBS="-lXext"
 
401
      AC_SUBST(SHM_LIBS)
 
402
    fi
 
403
  fi
 
404
fi
 
405
AM_CONDITIONAL(HAVE_SHM, test "x$SHM" = "xenabled")
 
406
 
 
407
dnl ###############################
 
408
dnl Checks for Xv extension
 
409
dnl ###############################
 
410
XV="disabled"
 
411
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv],[enable XVideo hardware acceleration (default is enabled)]),
 
412
[if test "x$enableval" = "xyes"; then
 
413
  enable_xv=yes
 
414
fi],enable_xv=yes)
 
415
if test "x${gm_platform}" != "xmingw" -a "x$enable_xv" = "xyes"; then
 
416
  PKG_CHECK_MODULES([XV], [xv],
 
417
                    [AC_DEFINE(HAVE_XV,1,[XVideo support])
 
418
                     XV="enabled"
 
419
                    ])
 
420
  AC_SUBST(XV_CFLAGS)
 
421
  AC_SUBST(XV_LIBS)
 
422
fi
 
423
 
 
424
AM_CONDITIONAL(HAVE_XV, test "x$XV" = "xenabled")
 
425
 
 
426
 
 
427
dnl ###########################################################################
 
428
dnl Checks for DX extension
 
429
dnl ###########################################################################
 
430
DX="disabled"
 
431
 
 
432
if test "x${gm_platform}" = "xmingw" ; then
 
433
  AC_ARG_WITH(directx-dir, AS_HELP_STRING([--with-directx-dir=PFX],[location of DirectDraw]), with_directx_dir="$withval", with_directx_dir=".")
 
434
 
 
435
  dnl Check for the includes presence
 
436
  AC_MSG_CHECKING(for DirectX includes in ${with_directx_dir})
 
437
  AC_MSG_RESULT()
 
438
  if test -d ${with_directx_dir}; then
 
439
    DX_CFLAGS="-I${with_directx_dir}"
 
440
    DX_LIBS="$EKIGA_LIBS -lddraw"
 
441
    AC_SUBST(DX_LIBS)
 
442
    AC_SUBST(DX_CFLAGS)
 
443
    DX="enabled"
 
444
    AC_DEFINE(HAVE_DX,1,[DirectDraw support])
 
445
  else
 
446
    AC_MSG_ERROR([Unable to locate DirectX header files; --with-directx-dir is obligatory])
 
447
  fi
 
448
fi
 
449
 
 
450
AM_CONDITIONAL(HAVE_DX, test "x$DX" = "xenabled")
 
451
 
 
452
 
 
453
dnl ###############################
 
454
dnl   DBUS Support
 
455
dnl ###############################
 
456
DBUS="disabled"
 
457
DBUS_SERVICE="disabled"
 
458
 
 
459
if test "x${gm_platform}" != "xmingw" ; then
 
460
  AC_ARG_ENABLE(dbus, AS_HELP_STRING([--enable-dbus],[enable DBUS support (default is enabled)]),
 
461
[if test "x$enableval" = "xyes"; then
 
462
  enable_dbus=yes
 
463
fi],enable_dbus=yes)
 
464
  AC_ARG_ENABLE(dbus-service, AS_HELP_STRING([--enable-dbus-service],[enable DBUS service installation (default is enabled)]),
 
465
[if test "x$enableval" = "xyes"; then
 
466
  enable_dbus_service=yes
 
467
fi],enable_dbus_service=yes)
 
468
 
 
469
  if test "x$enable_dbus" = "xyes"; then
 
470
    PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.36 dbus-glib-1 >= 0.36], [found_dbus=yes])
 
471
    AC_SUBST(DBUS_CFLAGS)
 
472
    AC_SUBST(DBUS_LIBS)
 
473
    DBUS="enabled"
 
474
    AC_DEFINE(HAVE_DBUS,1,[DBUS support])
 
475
 
 
476
    if test "x$found_dbus" = "xyes" -a "x$enable_dbus_service" = "xyes"; then
 
477
      DBUS_SERVICE="enabled"
 
478
    fi
 
479
  fi
 
480
fi
 
481
 
 
482
AM_CONDITIONAL(HAVE_DBUS, test "x$found_dbus" = "xyes")
 
483
AM_CONDITIONAL(INSTALL_DBUS_SERVICE, test "x$DBUS_SERVICE" = "xenabled")
 
484
 
 
485
 
 
486
dnl ###############################
 
487
dnl   V4L headers
 
488
dnl   These are only necessary until HAL has a decent V4L support...
 
489
dnl ###############################
 
490
 
 
491
OLDV4L="disabled"
 
492
V4L="disabled"
 
493
V4L2="disabled"
 
494
VIDEO4LINUX="disabled"
 
495
if test "x${win32}" != "x1"; then
 
496
  AC_CHECK_HEADER(libv4l1-videodev.h, V4L="enabled")
 
497
  AC_CHECK_HEADER(linux/videodev2.h, V4L2="enabled")
 
498
  AC_CHECK_HEADER(linux/videodev.h, OLDV4L="enabled")
 
499
 
 
500
  if test "x${V4L}" != "xdisabled" -a "x${V4L2}" != "xdisabled"; then
 
501
    AC_DEFINE(HAVE_V4L,1,[V4L support])
 
502
    VIDEO4LINUX="enabled"
 
503
  else
 
504
    if test "x${OLDV4L}" != "xdisabled"; then
 
505
      AC_DEFINE(HAVE_V4L,1,[V4L support])
 
506
      AC_DEFINE(HAVE_OLD_V4L,1,[V4L is old style])
 
507
      VIDEO4LINUX="enabled"
 
508
    fi
 
509
  fi
 
510
fi
 
511
AM_CONDITIONAL(HAVE_V4L, test "x${VIDEO4LINUX}" = "xenabled")
 
512
 
 
513
dnl ###############################
 
514
dnl   Avahi / mDNS Support
 
515
dnl ###############################
 
516
AVAHI="disabled"
 
517
 
 
518
if test "x${gm_platform}" != "xmingw" ; then
 
519
  AC_ARG_ENABLE(avahi, AS_HELP_STRING([--enable-avahi],[enable mDNS support (default is disabled)]),
 
520
[if test "x$enableval" = "xyes"; then
 
521
  enable_avahi=yes
 
522
fi],)
 
523
 
 
524
  if test "x$enable_avahi" = "xyes"; then
 
525
    PKG_CHECK_MODULES([AVAHI], [avahi-client >= 0.6 avahi-glib >= 0.6], [found_avahi=yes])
 
526
    AC_SUBST(AVAHI_CFLAGS)
 
527
    AC_SUBST(AVAHI_LIBS)
 
528
    AVAHI="enabled"
 
529
    AC_DEFINE(HAVE_AVAHI,1,[Avahi support])
 
530
  fi
 
531
fi
 
532
 
 
533
AM_CONDITIONAL(HAVE_AVAHI, test "x$found_avahi" = "xyes")
 
534
 
 
535
 
 
536
dnl ###############################
 
537
dnl    GStreamer Support
 
538
dnl ###############################
 
539
GSTREAMER="disabled"
 
540
 
 
541
AC_ARG_ENABLE(gstreamer, AS_HELP_STRING([--enable-gstreamer],[enable experimental GStreamer support (default is disabled)]),
 
542
[if test "x$enableval" = "xyes"; then
 
543
  enable_gstreamer=yes
 
544
fi],)
 
545
 
 
546
if test "x$enable_gstreamer" = "xyes"; then
 
547
  found_gstreamer=yes
 
548
  PKG_CHECK_MODULES([GSTREAMER], [gstreamer-plugins-base-0.10 >= 0.10.21.3 gstreamer-interfaces-0.10])
 
549
 
 
550
  if test "x$found_gstreamer" = "xno"; then
 
551
    AC_MSG_ERROR([Could not find GStreamer libraries])
 
552
  fi
 
553
  GSTREAMER_LIBS="$GSTREAMER_LIBS -lgstapp-0.10"
 
554
  AC_SUBST(GSTREAMER_CFLAGS)
 
555
  AC_SUBST(GSTREAMER_LIBS)
 
556
  GSTREAMER="enabled"
 
557
  AC_DEFINE(HAVE_GSTREAMER,1,[GStreamer support])
 
558
fi
 
559
 
 
560
AM_CONDITIONAL(HAVE_GSTREAMER, test "x$found_gstreamer" = "xyes")
 
561
 
 
562
 
 
563
dnl ###############################
 
564
dnl  KDE support
 
565
dnl ###############################
 
566
KDE="disabled"
 
567
 
 
568
AC_ARG_ENABLE(kde, AS_HELP_STRING([--enable-kde],[enable experimental KDE support (default is disabled)]),
 
569
[if test "x$enableval" = "xyes"; then
 
570
  enable_kde=yes
 
571
fi],)
 
572
 
 
573
if test "x$enable_kde" = "xyes"; then
 
574
 
 
575
  PKG_CHECK_MODULES(KDE, [QtCore], [found_kde=yes], [found_kde=no])
 
576
 
 
577
  CPPFLAGS_save="$CPPFLAGS"
 
578
  LIBS_save="$LIBS"
 
579
  CPPFLAGS="$CPPFLAGS $KDE_CFLAGS"
 
580
  LIBS="$LIBS $KDE_LIBS"
 
581
  AC_CHECK_HEADER(kapplication.h,,found_kde=no)
 
582
  CPPFLAGS="$CPPFLAGS_save"
 
583
  LIBS="$LIBS_save"
 
584
  if test "x$found_kde" = "xno"; then
 
585
    AC_MSG_ERROR([Could not find KDE headers])
 
586
  fi
 
587
 
 
588
  LIBS_save="$LIBS"
 
589
  CPPFLAGS="$CPPFLAGS $KDE_CFLAGS"
 
590
  LIBS="$LIBS $KDE_LIBS"
 
591
  AC_CHECK_LIB(kdeui,ki18n,found_kde=no)
 
592
  CPPFLAGS="$CPPFLAGS_save"
 
593
  LIBS="$LIBS_save"
 
594
  if test "x$found_kde" = "xno"; then
 
595
    AC_MSG_ERROR([Could not find KDE libraries])
 
596
  fi
 
597
 
 
598
  KDE_LIBS="$KDE_LIBS -lkdeui"
 
599
 
 
600
  AC_SUBST(KDE_CFLAGS)
 
601
  AC_SUBST(KDE_LIBS)
 
602
  KDE="enabled"
 
603
  AC_DEFINE(HAVE_KDE,1,[KDE support])
 
604
fi
 
605
 
 
606
AM_CONDITIONAL(HAVE_KDE, test "x$found_kde" = "xyes")
 
607
 
 
608
dnl ###############################
 
609
dnl  KAddressBook support
 
610
dnl ###############################
 
611
KAB="disabled"
 
612
 
 
613
AC_ARG_ENABLE(kab, AS_HELP_STRING([--enable-kab],[enable experimental KAddressBook support (default is disabled)]),
 
614
[if test "x$enableval" = "xyes"; then
 
615
  enable_kab=yes
 
616
fi],)
 
617
 
 
618
if test "x$enable_kab" = "xyes"; then
 
619
 
 
620
  if test "x$found_kde" != "xyes"; then
 
621
    AC_MSG_ERROR([No kab without kde: --enable-kde])
 
622
  fi
 
623
  found_kab=yes
 
624
  KAB_CFLAGS="-I/usr/include/qt4"
 
625
  KAB_LIBS="-lQtCore -lkabc"
 
626
  CPPFLAGS_save="$CPPFLAGS"
 
627
  LIBS_save="$LIBS"
 
628
  CPPFLAGS="$CPPFLAGS $KAB_CFLAGS"
 
629
  LIBS="$LIBS $KAB_LIBS"
 
630
  AC_CHECK_HEADER(kabc/addressee.h,,found_kab=no)
 
631
  CPPFLAGS="$CPPFLAGS_save"
 
632
  LIBS="$LIBS_save"
 
633
  if test "x$found_kab" = "xno"; then
 
634
    AC_MSG_ERROR([We need this header!])
 
635
  fi
 
636
  AC_SUBST(KAB_CFLAGS)
 
637
  AC_SUBST(KAB_LIBS)
 
638
  KAB="enabled"
 
639
  AC_DEFINE(HAVE_KAB,1,[KAddressBook support])
 
640
fi
 
641
 
 
642
AM_CONDITIONAL(HAVE_KAB, test "x$found_kab" = "xyes")
 
643
 
 
644
dnl ###############################
 
645
dnl   XCAP support
 
646
dnl ###############################
 
647
XCAP="disabled"
 
648
 
 
649
AC_ARG_ENABLE(xcap, AS_HELP_STRING([--enable-xcap],[enable experimental XCAP support (default is disabled)]),
 
650
[if test "x$enableval" = "xyes"; then
 
651
  enable_xcap=yes
 
652
fi],)
 
653
 
 
654
if test "x$enable_xcap" = "xyes"; then
 
655
   PKG_CHECK_MODULES([SOUP], [libsoup-2.4])
 
656
   found_xcap=yes
 
657
   XCAP="enabled"
 
658
   AC_SUBST(SOUP_CFLAGS)
 
659
   AC_SUBST(SOUP_LIBS)
 
660
  AC_DEFINE(HAVE_XCAP,1,[XCAP support])
 
661
fi
 
662
 
 
663
AM_CONDITIONAL(HAVE_XCAP, test "x$found_xcap" = "xyes")
 
664
 
 
665
dnl ###############################
 
666
dnl   LOUDMOUTH support
 
667
dnl ###############################
 
668
LOUDMOUTH="disabled"
 
669
 
 
670
AC_ARG_ENABLE(loudmouth, AS_HELP_STRING([--enable-loudmouth],[enable experimental Loudmouth support (default is disabled)]),
 
671
[if test "x$enableval" = "xyes"; then
 
672
  enable_loudmouth=yes
 
673
fi],)
 
674
 
 
675
if test "x$enable_loudmouth" = "xyes"; then
 
676
   PKG_CHECK_MODULES([LOUDMOUTH], [loudmouth-1.0])
 
677
   found_loudmouth=yes
 
678
   LOUDMOUTH="enabled"
 
679
   AC_SUBST(LOUDMOUTH_CFLAGS)
 
680
   AC_SUBST(LOUDMOUTH_LIBS)
 
681
  AC_DEFINE(HAVE_LOUDMOUTH,1,[Loudmouth support])
 
682
fi
 
683
 
 
684
AM_CONDITIONAL(HAVE_LOUDMOUTH, test "x$found_loudmouth" = "xyes")
 
685
 
 
686
 
 
687
dnl ###############################
 
688
dnl   Gnome-Doc-Utils
 
689
dnl ###############################
 
690
# GDU is disabled for Windows; help is generated separately manually in Makefile
 
691
GNOME_DOC_INIT(,,[GDI=no])
 
692
if test "x${gm_platform}" != "xmingw" ; then
 
693
  GDU="disabled"
 
694
  AC_ARG_ENABLE(gdu, AS_HELP_STRING([--enable-gdu],[enable GNOME-Doc-Utils support, i.e. help file generation (default is enabled)]),
 
695
[if test "x$enableval" = "xyes"; then
 
696
  enable_gdu=yes
 
697
fi],enable_gdu=yes)
 
698
  if test "x$enable_gdu" = "xyes"; then
 
699
    AC_PATH_PROG(SK_CONFIG,scrollkeeper-config,no)
 
700
    if test "x$SK_CONFIG" != "xno" -a "x$GDI" != "xno"; then
 
701
      GDU="enabled"
 
702
      AC_DEFINE(HAVE_GNOME_DOC_UTILS,1,[GNOME-Doc-Utils support])
 
703
    fi
 
704
  fi
 
705
fi
 
706
 
 
707
AM_CONDITIONAL(HAVE_GNOME_DOC_UTILS, test "x${enable_gdu}" = "xyes")
 
708
 
 
709
 
 
710
dnl ###########################################################################
 
711
dnl PTLib + OPAL Headers and Libraries
 
712
dnl ###########################################################################
 
713
PKG_CHECK_MODULES([PTLIB], [ptlib >= ${PTLIB_REC_VERSION}])
 
714
PKG_CHECK_MODULES([OPAL], [opal >= ${OPAL_REC_VERSION}])
 
715
 
 
716
# expat is mandatory for presence (at least)
 
717
AC_MSG_CHECKING(for PTLIB support for expat)
 
718
PTLIB_EXPAT=`$PKG_CONFIG ptlib --variable=PTLIB_EXPAT`
 
719
AC_MSG_RESULT($PTLIB_EXPAT)
 
720
if test "x$PTLIB_EXPAT" != "xyes"; then
 
721
  AC_MSG_ERROR([You need ptlib expat support to compile ekiga])
 
722
fi
 
723
 
 
724
SUFFIX=
 
725
AC_ARG_ENABLE([opal-debug],
 
726
              [AS_HELP_STRING([--enable-opal-debug],[link to debug versions of opal and ptlib (opal_d and ptlib_d) (default is disabled)])],
 
727
              [if test "x$enableval" = "xyes"; then
 
728
                SUFFIX="_d"
 
729
              fi])
 
730
 
 
731
AC_ARG_ENABLE([static-libs],
 
732
              [AS_HELP_STRING([--enable-static-libs],[link to opal and ptlib static libraries (default is disabled)])],
 
733
              [if test "x$enableval" = "xyes"; then
 
734
                SUFFIX="${SUFFIX}_s"
 
735
               fi
 
736
              ])
 
737
 
 
738
if test "x$SUFFIX" != x; then
 
739
    OPAL_LIBS=`$PKG_CONFIG opal --define-variable=suffix=$SUFFIX --libs`
 
740
    PTLIB_LIBS=`$PKG_CONFIG ptlib --define-variable=suffix=$SUFFIX --libs`
 
741
fi
 
742
 
 
743
AC_SUBST(PTLIB_CFLAGS)
 
744
AC_SUBST(PTLIB_LIBS)
 
745
AC_SUBST(OPAL_CFLAGS)
 
746
AC_SUBST(OPAL_LIBS)
 
747
 
 
748
# check for H.323 support
 
749
AC_ARG_ENABLE(h323, AS_HELP_STRING([--enable-h323],[enable H.323 support (default same as opal)]),
 
750
              enable_h323=$enableval)
 
751
if test x$enable_h323 != xno; then
 
752
  dnl The =1 checks are here only for backward compatibility
 
753
  H323=`$PKG_CONFIG --variable=h323 opal`
 
754
  if test "x$H323" = "x1"; then
 
755
    H323="yes"
 
756
  else
 
757
    H323=`$PKG_CONFIG --variable=OPAL_H323 opal`
 
758
  fi
 
759
 
 
760
  if test "x$H323" = "xyes"; then
 
761
    AC_DEFINE(HAVE_H323,1,[H323 support])
 
762
  else
 
763
    if test x$enable_h323 = xyes; then
 
764
      AC_MSG_ERROR([To enable H.323 support you need to re-install opal with H.323 support])
 
765
    fi
 
766
  fi
 
767
else
 
768
  H323="no"
 
769
fi
 
770
 
 
771
AM_CONDITIONAL(HAVE_H323, test "x${H323}" = "xyes")
 
772
 
 
773
# check for mandatory SIP support in opal
 
774
SIP=`$PKG_CONFIG --variable=sip opal`
 
775
if test "x$SIP" = "x1"; then
 
776
  SIP="yes"
 
777
else
 
778
  SIP=`$PKG_CONFIG --variable=OPAL_SIP opal`
 
779
fi
 
780
 
 
781
if test "x$SIP" != "xyes"; then
 
782
  AC_MSG_ERROR([You have to compile opal with SIP support. SIP support is mandatory.])
 
783
fi
 
784
 
 
785
 
 
786
dnl ###############################
 
787
dnl DEBUG support
 
788
dnl ###############################
 
789
has_debug=
 
790
AC_ARG_ENABLE([debug],
 
791
              [AS_HELP_STRING([--enable-debug],[compile with debug support (default is disabled)])],
 
792
              [if test "x$enableval" = "xyes"; then
 
793
                CPPFLAGS="-DDEBUG $CPPFLAGS"
 
794
                has_debug="yes"
 
795
              fi])
 
796
AM_CONDITIONAL(DEBUG, test "x$has_debug" = "xyes")
 
797
 
 
798
 
 
799
dnl #########################################################################
 
800
dnl  Support for internationalization
 
801
dnl ########################################################################
 
802
GETTEXT_PACKAGE=AC_PACKAGE_NAME
 
803
AC_SUBST(GETTEXT_PACKAGE)  # needed by gettext in po directory
 
804
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[fix])
 
805
AM_GLIB_GNU_GETTEXT
 
806
 
 
807
 
 
808
dnl ###########################################################################
 
809
dnl  Data and configuration directories for the system
 
810
dnl ###########################################################################
 
811
gnomedatadir=`eval "echo ${datadir}"`
 
812
gnomeconfdir=`eval "echo ${sysconfdir}"`
 
813
AC_SUBST(gnomedatadir)
 
814
AC_SUBST(gnomeconfdir)
 
815
 
 
816
# on Windows, data_dir is obtained at run-time, since it depends on
 
817
#   the installation directory, so do not define it (to avoids bugs)
 
818
if test "x${gm_platform}" != "xmingw" ; then
 
819
   if test "x${prefix}" = "xNONE"; then
 
820
      AC_DEFINE_UNQUOTED(DATA_DIR, "${ac_default_prefix}/${DATADIRNAME}",[fix])
 
821
   else
 
822
      AC_DEFINE_UNQUOTED(DATA_DIR, "${prefix}/${DATADIRNAME}",[fix])
 
823
   fi
 
824
fi
 
825
 
 
826
dnl ###########################################################################
 
827
dnl  Plugin support
 
828
dnl ###########################################################################
 
829
 
 
830
case "$host" in
 
831
*-mingw*)
 
832
        # libtool really installs in ../bin, so we have to add the dummy!
 
833
        # and we have to set PLUGIN_DIR to that directory
 
834
        bindir='${exec_prefix}'
 
835
        stacklibdir='${exec_prefix}'
 
836
        plugindir='${exec_prefix}/plugins'
 
837
        PLUGIN_DIR='plugins'
 
838
        ;;
 
839
*)
 
840
        versioned_libdir='${libdir}/AC_PACKAGE_NAME/AC_PACKAGE_VERSION'
 
841
        stacklibdir=${versioned_libdir}
 
842
        plugindir=${versioned_libdir}/plugins
 
843
        PLUGIN_DIR='${plugindir}'
 
844
        ;;
 
845
esac
 
846
 
 
847
PLUGINS_LIBTOOL_FLAGS="-no-undefined -avoid-version -module"
 
848
STACKLIB_LDFLAGS='-shared -module -no-undefined -avoid-version'
 
849
 
 
850
AC_SUBST(bindir)
 
851
AC_SUBST(stacklibdir)
 
852
AC_SUBST(plugindir)
 
853
AC_SUBST(PLUGINS_LIBTOOL_FLAGS)
 
854
AC_SUBST(PLUGIN_DIR)
 
855
AC_SUBST(STACKLIB_LDFLAGS)
 
856
 
 
857
dnl ###########################################################################
 
858
dnl  Output the different Makefiles
 
859
dnl ###########################################################################
 
860
AC_CONFIG_FILES([Makefile
 
861
Doxyfile
 
862
src/ekiga-config-tool
 
863
ekiga.schemas.in
 
864
ekiga.desktop.in
 
865
lib/Makefile
 
866
po/Makefile.in
 
867
man/Makefile
 
868
src/Makefile
 
869
pixmaps/Makefile
 
870
sounds/Makefile
 
871
help/Makefile
 
872
plugins/Makefile
 
873
plugins/avahi/Makefile
 
874
plugins/evolution/Makefile
 
875
plugins/gstreamer/Makefile
 
876
plugins/kab/Makefile
 
877
plugins/kde/Makefile
 
878
plugins/ldap/Makefile
 
879
plugins/libnotify/Makefile
 
880
plugins/loudmouth/Makefile
 
881
plugins/resource-list/Makefile
 
882
plugins/xcap/Makefile
 
883
])
 
884
AC_OUTPUT
 
885
 
 
886
dnl ###########################################################################
 
887
dnl Summary
 
888
dnl ###########################################################################
 
889
 
 
890
echo ""
 
891
echo "================ Final configuration ==================="
 
892
echo "          Installing into prefix  :  $prefix"
 
893
echo ""
 
894
if test "x${gm_platform}" != "xmingw" ; then
 
895
echo "                     GDU support  :  $GDU"
 
896
echo "                   GConf support  :  $GCONF"
 
897
echo "   Evolution-Data-Server support  :  $EDS"
 
898
echo "                  NOTIFY support  :  $NOTIFY"
 
899
fi
 
900
echo "                    LDAP support  :  $LDAP"
 
901
if test "x${gm_platform}" != "xmingw" ; then
 
902
echo ""
 
903
echo "             Video4Linux support  :  $VIDEO4LINUX"
 
904
fi
 
905
echo ""
 
906
echo "                  XVideo support  :  $XV"
 
907
echo "           Shared Memory support  :  $SHM"
 
908
if test "x${gm_platform}" = "xmingw" ; then
 
909
echo "                 DirectX support  :  $DX"
 
910
fi
 
911
echo ""
 
912
echo "                   H.323 support  :  $H323"
 
913
echo ""
 
914
if test "x${gm_platform}" != "xmingw" ; then
 
915
echo "                    DBUS support  :  $DBUS"
 
916
echo "            DBUS service support  :  $DBUS_SERVICE"
 
917
echo "             mDNS/DNS-SD support  :  $AVAHI"
 
918
fi
 
919
echo ""
 
920
echo "The following features are experimental -- you've been warned:"
 
921
echo "               GStreamer support  :  $GSTREAMER"
 
922
echo "            KAddressBook support  :  $KAB"
 
923
echo "                     KDE support  :  $KDE"
 
924
echo "                    XCAP support  :  $XCAP"
 
925
echo "               Loudmouth support  :  $LOUDMOUTH"
 
926
echo ""
 
927
echo "                         OS Type  :  $target_os"
 
928
echo "                    Machine Type  :  $target_cpu"
 
929
echo "                      Byte Order  :  $byte_order"
 
930
echo ""
 
931
echo " If all settings are OK, type make and make install "
 
932
echo "========================================================"