forked from brownsys/pane-ekiga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
740 lines (600 loc) · 21.9 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
AC_INIT([ekiga],[4.1.0],[http://bugzilla.gnome.org/enter_bug.cgi?product=ekiga])
AC_CANONICAL_TARGET
AC_PREREQ([2.53])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/main.cpp)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_HEADERS([config.h])
dnl use "make V=1" if you want to see the long awful lines
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_LANG(C++)
dnl ###########################################################################
dnl Definitions
dnl ###########################################################################
MAJOR_VERSION=4
MINOR_VERSION=1
BUILD_TYPE=ReleaseCode
BUILD_NUMBER=0
PTLIB_REC_VERSION="2.15.1"
OPAL_REC_VERSION="3.15.1"
AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR_VERSION,[fix])
AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION,[fix])
AC_DEFINE_UNQUOTED(BUILD_TYPE, $BUILD_TYPE,[fix])
AC_DEFINE_UNQUOTED(BUILD_NUMBER, $BUILD_NUMBER,[fix])
dnl ###########################################################################
dnl Disable / Enable Main Ekiga Components
dnl ###########################################################################
PKG_PROG_PKG_CONFIG
LT_INIT([dlopen disable-static])
AC_PROG_CC_C99
AC_PROG_CXX
AC_SEARCH_LIBS([strerror],[cposix])
AC_HEADER_STDC
dnl Enable compiler warnings
if test ".$ac_cv_c_compiler_gnu" = .yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Winit-self -Wswitch-default -Wswitch-enum -Wstrict-aliasing=2 -Wfloat-equal -Wshadow"
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Winit-self -Wswitch-default -Wswitch-enum -Wstrict-aliasing=2 -Wfloat-equal -Wshadow"
fi
dnl Check the library path
case $host in
*-*-linux*)
# Test if the compiler is 64bit
echo 'int i;' > conftest.$ac_ext
ekiga_cv_cc_64bit_output=no
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*"ELF 64"*)
ekiga_cv_cc_64bit_output=yes
;;
esac
fi
rm -rf conftest*
;;
esac
case $host_cpu:$ekiga_cv_cc_64bit_output in
powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
libname="lib64"
;;
*:*)
libname="lib"
;;
esac
dnl Check the OS type (more types can be added)
AC_MSG_CHECKING(whether OS type is supported)
win32=0
case $target_os in
solaris*)
gm_platform="solaris"
;;
linux-gnulp | linux-gnu | linux-gnuspe | linux-gnuabi* | linux-gnueabi* | linux | Linux)
gm_platform="linux"
;;
gnu* )
gm_platform="gnu"
;;
FreeBSD* | freebsd* | kfreebsd* | NetBSD* | netbsd* | OpenBSD* | openbsd* )
gm_platform="freebsd"
;;
darwin* )
gm_platform="macosx"
;;
mingw* )
gm_platform="mingw"
CFLAGS="$CFLAGS -Wl,--enable-auto-import"
CXXFLAGS="$CXXFLAGS -Wl,--enable-auto-import"
win32=1
;;
*)
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.])
;;
esac
AC_MSG_RESULT([yes])
AM_CONDITIONAL(WIN32, test "x${win32}" = "x1")
dnl ###############################
dnl Mandatory intltool support
dnl ###############################
IT_PROG_INTLTOOL([0.35.0])
dnl ###############################
dnl Mandatory GTK+ support
dnl ###############################
# on Windows the icons are manually copied in the installer
if test "x${gm_platform}" = "xmingw" ; then
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.12.0])
else
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.12.0 gnome-icon-theme >= 3.0.0])
fi
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.40.0 gmodule-2.0 gobject-2.0 gthread-2.0 gio-2.0])
PKG_CHECK_MODULES([GTK_SIDEBAR], [gtk+-3.0 >= 3.16.0], [have_sidebar="yes"], [have_sidebar="no"])
if test "x${have_sidebar}" = "xyes" ; then
AC_DEFINE(HAVE_SIDEBAR,1,[GtkSideBar support])
fi
AM_CONDITIONAL(HAVE_SIDEBAR, test "x${have_sidebar}" = "xyes")
AC_ARG_ENABLE([gtk-debug],
[AS_HELP_STRING([--enable-gtk-debug],[enable GTK+ debug flags (default is disabled)])],
[if test "x$enableval" = "xyes"; then
GTK_CFLAGS="$GTK_CFLAGS -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES"
GLIB_CFLAGS="$GLIB_CFLAGS -DG_DISABLE_DEPRECATED"
fi])
dnl ##########################################
dnl Mandatory GST Clutter & Clutter support
dnl ##########################################
PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0])
PKG_CHECK_MODULES([GSTREAMER_PLUGINS_BASE], [gstreamer-plugins-base-1.0])
dnl ###############################
dnl Mandatory BOOST support
dnl ###############################
AX_BOOST_BASE([1.53])
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_CHECK_HEADER(boost/signals2.hpp,, found_signals2=no)
CPPFLAGS="$CPPFLAGS_save"
if test "x$found_signals2" = "xno"; then
AC_MSG_ERROR([Could not find BOOST signals2 headers])
fi
dnl ###############################
dnl Mandatory libXML support
dnl ###############################
PKG_CHECK_MODULES([XML], [libxml-2.0])
dnl ###############################
dnl GSettings support
dnl ###############################
GLIB_GSETTINGS
dnl ###############################
dnl GUDev support
dnl ###############################
GUDEV="disabled"
if test "x${gm_platform}" == "xlinux" ; then
AC_ARG_ENABLE(gudev, AS_HELP_STRING([--enable-gudev],[enable GUDev support (default is enabled)]),
[if test "x$enableval" = "xyes"; then
enable_gudev=yes
fi],enable_gudev=yes)
if test "x$enable_gudev" = "xyes"; then
PKG_CHECK_MODULES([GUDEV], [gudev-1.0], [found_gudev=yes])
GUDEV="enabled"
AC_DEFINE(HAVE_GUDEV,1,[GUDev support])
fi
fi
AM_CONDITIONAL(HAVE_GUDEV, test "x$found_gudev" = "xyes")
dnl ###############################
dnl Evolution-data-server support
dnl ###############################
EDS="disabled"
if test "x${gm_platform}" != "xmingw" ; then
AC_ARG_ENABLE(eds, AS_HELP_STRING([--enable-eds],[enable evolution-data-server addressbook support (default is enabled)]),
[if test "x$enableval" = "xyes"; then
enable_eds=yes
fi],enable_eds=yes)
if test "x$enable_eds" = "xyes"; then
PKG_CHECK_MODULES([EDS], [libebook-1.2], [found_eds=yes])
EDS="enabled"
AC_DEFINE(HAVE_EDS,1,[EDS support])
fi
fi
AM_CONDITIONAL(HAVE_EDS, test "x$found_eds" = "xyes")
dnl ###############################
dnl LDAP support
dnl ###############################
LDAP="disabled"
AC_ARG_ENABLE(ldap, AS_HELP_STRING([--enable-ldap],[enable LDAP addressbook support (default is enabled)]),
[if test "x$enableval" = "xyes"; then
enable_ldap=yes
fi],enable_ldap=yes)
if test "x$enable_ldap" = "xyes"; then
AC_ARG_WITH(ldap-dir, AS_HELP_STRING([--with-ldap-dir=PFX],[location of LDAP]), with_ldap_dir="$withval", with_ldap_dir="/usr")
dnl Check for the includes presence
AC_MSG_CHECKING(for LDAP includes in ${with_ldap_dir}/include/)
AC_MSG_RESULT()
if test -f ${with_ldap_dir}/include/ldap.h; then
LDAP_CFLAGS="-I${with_ldap_dir}/include"
else
AC_MSG_ERROR([You need the LDAP headers to compile Ekiga with LDAP support])
fi
dnl Checking for the library presence
LIBS_save="$LIBS"
LIBS="${LIBS} -L${with_ldap_dir}/${libname}/ -llber"
AC_CHECK_LIB(ldap, main, ldap_libs="yes", ldap_libs="no")
LIBS="${LIBS_save}"
if test "x${ldap_libs}" != "xno"; then
LDAP_LIBS="-llber -lldap"
if test "x${with_ldap_dir}" != "x/usr"; then
LDAP_LIBS="-L${with_ldap_dir}/${libname} $LDAP_LIBS"
fi
else
AC_MSG_ERROR([You need the LDAP library to compile Ekiga with LDAP support])
fi
dnl Checking for libsasl2
AC_ARG_WITH(libsasl2-dir, AS_HELP_STRING([--with-libsasl2-dir=PFX],[location of LIBSASL2]), with_libsasl2_dir="$withval", with_libsasl2_dir="/usr")
dnl Check for the libsasl2 includes presence
AC_MSG_CHECKING(for LIBSASL2 includes in ${with_libsasl2_dir}/include/)
AC_MSG_RESULT()
if test -f ${with_libsasl2_dir}/include/sasl/sasl.h; then
LDAP_CFLAGS="${LDAP_CFLAGS} -I${with_libsasl2_dir}/include"
else
AC_MSG_ERROR([You need the SASL2 library to compile Ekiga])
fi
LDAP_LIBS="$LDAP_LIBS -lsasl2"
dnl Checking for libresolv
if test ${gm_platform} = "linux" ; then
AC_CHECK_LIB(resolv, res_gethostbyaddr, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([You need the libresolv library to compile Ekiga]), -lresolv)
LDAP_LIBS="${LDAP_LIBS} -lresolv"
fi
found_ldap="yes"
LDAP="enabled"
AC_DEFINE(HAVE_LDAP,1,[LDAP support])
fi
AM_CONDITIONAL(HAVE_LDAP, test "x$found_ldap" = "xyes")
AM_PROG_AS
dnl ###############################
dnl DBUS Support
dnl ###############################
DBUS="disabled"
DBUS_SERVICE="disabled"
if test "x${gm_platform}" != "xmingw" ; then
AC_ARG_ENABLE(dbus, AS_HELP_STRING([--enable-dbus],[enable DBUS support (default is enabled)]),
[if test "x$enableval" = "xyes"; then
enable_dbus=yes
fi],enable_dbus=yes)
AC_ARG_ENABLE(dbus-service, AS_HELP_STRING([--enable-dbus-service],[enable DBUS service installation (default is enabled)]),
[if test "x$enableval" = "xyes"; then
enable_dbus_service=yes
fi],enable_dbus_service=yes)
if test "x$enable_dbus" = "xyes"; then
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.36 dbus-glib-1 >= 0.36], [found_dbus=yes])
DBUS="enabled"
AC_DEFINE(HAVE_DBUS,1,[DBUS support])
if test "x$found_dbus" = "xyes" -a "x$enable_dbus_service" = "xyes"; then
DBUS_SERVICE="enabled"
fi
fi
fi
AM_CONDITIONAL(HAVE_DBUS, test "x$found_dbus" = "xyes")
AM_CONDITIONAL(INSTALL_DBUS_SERVICE, test "x$DBUS_SERVICE" = "xenabled")
dnl ###############################
dnl Avahi / mDNS Support
dnl ###############################
AVAHI="disabled"
if test "x${gm_platform}" != "xmingw" ; then
AC_ARG_ENABLE(avahi, AS_HELP_STRING([--enable-avahi],[enable mDNS support (default is enabled)]),
[if test "x$enableval" = "xyes"; then
enable_avahi=yes
fi],enable_avahi=yes)
if test "x$enable_avahi" = "xyes"; then
PKG_CHECK_MODULES([AVAHI], [avahi-client >= 0.6 avahi-glib >= 0.6], [found_avahi=yes])
AVAHI="enabled"
AC_DEFINE(HAVE_AVAHI,1,[Avahi support])
fi
fi
AM_CONDITIONAL(HAVE_AVAHI, test "x$found_avahi" = "xyes")
dnl ###############################
dnl GStreamer Plugins Support
dnl ###############################
GSTREAMER="disabled"
AC_ARG_ENABLE(gstreamer, AS_HELP_STRING([--enable-gstreamer],[enable experimental GStreamer support (default is disabled)]),
[if test "x$enableval" = "xyes"; then
enable_gstreamer=yes
fi],)
if test "x$enable_gstreamer" = "xyes"; then
found_gstreamer=yes
PKG_CHECK_MODULES([GSTREAMER], [gstreamer-plugins-base-0.10 >= 0.10.21.3 gstreamer-interfaces-0.10])
if test "x$found_gstreamer" = "xno"; then
AC_MSG_ERROR([Could not find GStreamer libraries])
fi
GSTREAMER_LIBS="$GSTREAMER_LIBS -lgstapp-0.10"
GSTREAMER="enabled"
AC_DEFINE(HAVE_GSTREAMER,1,[GStreamer support])
fi
AM_CONDITIONAL(HAVE_GSTREAMER, test "x$found_gstreamer" = "xyes")
dnl ###############################
dnl KDE support
dnl ###############################
KDE="disabled"
AC_ARG_ENABLE(kde, AS_HELP_STRING([--enable-kde],[enable experimental KDE support (default is disabled)]),
[if test "x$enableval" = "xyes"; then
enable_kde=yes
fi],)
if test "x$enable_kde" = "xyes"; then
PKG_CHECK_MODULES(KDE, [QtCore], [found_kde=yes], [found_kde=no])
CPPFLAGS_save="$CPPFLAGS"
LIBS_save="$LIBS"
CPPFLAGS="$CPPFLAGS $KDE_CFLAGS"
LIBS="$LIBS $KDE_LIBS"
AC_CHECK_HEADER(kapplication.h,,found_kde=no)
CPPFLAGS="$CPPFLAGS_save"
LIBS="$LIBS_save"
if test "x$found_kde" = "xno"; then
AC_MSG_ERROR([Could not find KDE headers])
fi
LIBS_save="$LIBS"
CPPFLAGS="$CPPFLAGS $KDE_CFLAGS"
LIBS="$LIBS $KDE_LIBS"
AC_CHECK_LIB(kdeui,ki18n,found_kde=no)
CPPFLAGS="$CPPFLAGS_save"
LIBS="$LIBS_save"
if test "x$found_kde" = "xno"; then
AC_MSG_ERROR([Could not find KDE libraries])
fi
KDE_LIBS="$KDE_LIBS -lkdeui"
KDE="enabled"
AC_DEFINE(HAVE_KDE,1,[KDE support])
fi
AM_CONDITIONAL(HAVE_KDE, test "x$found_kde" = "xyes")
dnl ###############################
dnl KAddressBook support
dnl ###############################
KAB="disabled"
AC_ARG_ENABLE(kab, AS_HELP_STRING([--enable-kab],[enable experimental KAddressBook support (default is disabled)]),
[if test "x$enableval" = "xyes"; then
enable_kab=yes
fi],)
if test "x$enable_kab" = "xyes"; then
if test "x$found_kde" != "xyes"; then
AC_MSG_ERROR([No kab without kde: --enable-kde])
fi
found_kab=yes
KAB_CFLAGS="-I/usr/include/qt4"
KAB_LIBS="-lQtCore -lkabc"
CPPFLAGS_save="$CPPFLAGS"
LIBS_save="$LIBS"
CPPFLAGS="$CPPFLAGS $KAB_CFLAGS"
LIBS="$LIBS $KAB_LIBS"
AC_CHECK_HEADER(kabc/addressee.h,,found_kab=no)
CPPFLAGS="$CPPFLAGS_save"
LIBS="$LIBS_save"
if test "x$found_kab" = "xno"; then
AC_MSG_ERROR([We need this header!])
fi
KAB="enabled"
AC_DEFINE(HAVE_KAB,1,[KAddressBook support])
fi
AM_CONDITIONAL(HAVE_KAB, test "x$found_kab" = "xyes")
dnl ###############################
dnl XCAP support
dnl ###############################
XCAP="disabled"
AC_ARG_ENABLE(xcap, AS_HELP_STRING([--enable-xcap],[enable experimental XCAP support (default is disabled)]),
[if test "x$enableval" = "xyes"; then
enable_xcap=yes
fi],)
if test "x$enable_xcap" = "xyes"; then
PKG_CHECK_MODULES([SOUP], [libsoup-2.4])
found_xcap=yes
XCAP="enabled"
AC_DEFINE(HAVE_XCAP,1,[XCAP support])
fi
AM_CONDITIONAL(HAVE_XCAP, test "x$found_xcap" = "xyes")
dnl ###############################
dnl LOUDMOUTH support
dnl ###############################
LOUDMOUTH="disabled"
AC_ARG_ENABLE(loudmouth, AS_HELP_STRING([--enable-loudmouth],[enable experimental Loudmouth support (default is disabled)]),
[if test "x$enableval" = "xyes"; then
enable_loudmouth=yes
fi],)
if test "x$enable_loudmouth" = "xyes"; then
PKG_CHECK_MODULES([LOUDMOUTH], [loudmouth-1.0])
found_loudmouth=yes
LOUDMOUTH="enabled"
AC_DEFINE(HAVE_LOUDMOUTH,1,[Loudmouth support])
fi
AM_CONDITIONAL(HAVE_LOUDMOUTH, test "x$found_loudmouth" = "xyes")
dnl ###############################
dnl Gnome-Doc-Utils
dnl ###############################
# GDU is disabled for Windows; help is generated separately manually in Makefile
GNOME_DOC_INIT(,,[GDI=no])
if test "x${gm_platform}" != "xmingw" ; then
GDU="disabled"
AC_ARG_ENABLE(gdu, AS_HELP_STRING([--enable-gdu],[enable GNOME-Doc-Utils support, i.e. help file generation (default is enabled)]),
[if test "x$enableval" = "xyes"; then
enable_gdu=yes
fi],enable_gdu=yes)
if test "x$enable_gdu" = "xyes"; then
AC_PATH_PROG(SK_CONFIG,scrollkeeper-config,no)
if test "x$SK_CONFIG" != "xno" -a "x$GDI" != "xno"; then
GDU="enabled"
AC_DEFINE(HAVE_GNOME_DOC_UTILS,1,[GNOME-Doc-Utils support])
fi
fi
fi
AM_CONDITIONAL(HAVE_GNOME_DOC_UTILS, test "x${enable_gdu}" = "xyes")
dnl ###########################################################################
dnl PTLib + OPAL Headers and Libraries
dnl ###########################################################################
PKG_CHECK_MODULES([PTLIB], [ptlib >= ${PTLIB_REC_VERSION}])
PKG_CHECK_MODULES([OPAL], [opal >= ${OPAL_REC_VERSION}])
# expat is mandatory for presence (at least)
AC_MSG_CHECKING(for PTLIB support for expat)
PTLIB_EXPAT=`$PKG_CONFIG ptlib --variable=PTLIB_EXPAT`
AC_MSG_RESULT($PTLIB_EXPAT)
if test "x$PTLIB_EXPAT" != "xyes"; then
AC_MSG_ERROR([You need ptlib expat support to compile ekiga])
fi
# video support is mandatory (too many changes in ekiga to support without video)
AC_MSG_CHECKING(for PTLIB support for video)
PTLIB_VIDEO=`$PKG_CONFIG ptlib --variable=PTLIB_VIDEO`
AC_MSG_RESULT($PTLIB_VIDEO)
if test "x$PTLIB_VIDEO" != "xyes"; then
AC_MSG_ERROR([You need ptlib video support to compile ekiga])
fi
# AEC is mandatory for good quality
AC_MSG_CHECKING(for OPAL support for AEC)
OPAL_AEC=`$PKG_CONFIG opal --variable=OPAL_AEC`
AC_MSG_RESULT($OPAL_AEC)
if test "x$OPAL_AEC" != "xyes"; then
AC_MSG_ERROR([You need opal aec support to compile ekiga])
fi
SUFFIX=
AC_ARG_ENABLE([opal-debug],
[AS_HELP_STRING([--enable-opal-debug],[link to debug versions of opal and ptlib (opal_d and ptlib_d) (default is disabled)])],
[if test "x$enableval" = "xyes"; then
SUFFIX="_d"
fi])
AC_ARG_ENABLE([static-libs],
[AS_HELP_STRING([--enable-static-libs],[link to opal and ptlib static libraries (default is disabled)])],
[if test "x$enableval" = "xyes"; then
SUFFIX="${SUFFIX}_s"
fi
])
if test "x$SUFFIX" != x; then
OPAL_LIBS=`$PKG_CONFIG opal --define-variable=suffix=$SUFFIX --libs`
PTLIB_LIBS=`$PKG_CONFIG ptlib --define-variable=suffix=$SUFFIX --libs`
fi
# check for H.323 support
AC_ARG_ENABLE(h323, AS_HELP_STRING([--enable-h323],[enable H.323 support (default same as opal)]),
enable_h323=$enableval)
if test x$enable_h323 != xno; then
dnl The =1 checks are here only for backward compatibility
H323=`$PKG_CONFIG --variable=h323 opal`
if test "x$H323" = "x1"; then
H323="yes"
else
H323=`$PKG_CONFIG --variable=OPAL_H323 opal`
fi
if test "x$H323" = "xyes"; then
AC_DEFINE(HAVE_H323,1,[H323 support])
else
if test x$enable_h323 = xyes; then
AC_MSG_ERROR([To enable H.323 support you need to re-install opal with H.323 support])
fi
fi
else
H323="no"
fi
AM_CONDITIONAL(HAVE_H323, test "x${H323}" = "xyes")
# check for mandatory SIP support in opal
SIP=`$PKG_CONFIG --variable=sip opal`
if test "x$SIP" = "x1"; then
SIP="yes"
else
SIP=`$PKG_CONFIG --variable=OPAL_SIP opal`
fi
if test "x$SIP" != "xyes"; then
AC_MSG_ERROR([You have to compile opal with SIP support. SIP support is mandatory.])
fi
dnl ###############################
dnl DEBUG support
dnl ###############################
has_debug=
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],[compile with debug support (default is disabled)])],
[if test "x$enableval" = "xyes"; then
CPPFLAGS="-DDEBUG $CPPFLAGS"
has_debug="yes"
fi])
AM_CONDITIONAL(DEBUG, test "x$has_debug" = "xyes")
dnl #########################################################################
dnl Support for internationalization
dnl ########################################################################
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE) # needed by gettext in po directory
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[fix])
AM_GLIB_GNU_GETTEXT
dnl ###########################################################################
dnl Data and configuration directories for the system
dnl ###########################################################################
gnomedatadir=`eval "echo ${datadir}"`
gnomeconfdir=`eval "echo ${sysconfdir}"`
AC_SUBST(gnomedatadir)
AC_SUBST(gnomeconfdir)
# on Windows, data_dir is obtained at run-time, since it depends on
# the installation directory, so do not define it (to avoids bugs)
if test "x${gm_platform}" != "xmingw" ; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(DATA_DIR, "${ac_default_prefix}/${DATADIRNAME}",[fix])
else
AC_DEFINE_UNQUOTED(DATA_DIR, "${prefix}/${DATADIRNAME}",[fix])
fi
fi
dnl ###########################################################################
dnl Plugin support
dnl ###########################################################################
case "$host" in
*-mingw*)
# libtool really installs in ../bin, so we have to add the dummy!
# and we have to set PLUGIN_DIR to that directory
bindir='${exec_prefix}'
stacklibdir='${exec_prefix}'
plugindir='${exec_prefix}/plugins'
PLUGIN_DIR='plugins'
;;
*)
versioned_libdir='${libdir}/AC_PACKAGE_NAME/AC_PACKAGE_VERSION'
stacklibdir=${versioned_libdir}
plugindir=${versioned_libdir}/plugins
PLUGIN_DIR='${plugindir}'
;;
esac
PLUGINS_LIBTOOL_FLAGS="-no-undefined -avoid-version -module"
STACKLIB_LDFLAGS='-shared -module -no-undefined -avoid-version'
AC_SUBST(bindir)
AC_SUBST(stacklibdir)
AC_SUBST(plugindir)
AC_SUBST(PLUGINS_LIBTOOL_FLAGS)
AC_SUBST(PLUGIN_DIR)
AC_SUBST(STACKLIB_LDFLAGS)
dnl ###########################################################################
dnl Output the different Makefiles
dnl ###########################################################################
AC_CONFIG_FILES([Makefile
Doxyfile
org.gnome.ekiga.gschema.xml.in
ekiga.convert
org.gnome.ekiga.desktop.in
lib/Makefile
po/Makefile.in
man/Makefile
src/Makefile
pixmaps/Makefile
sounds/Makefile
help/Makefile
plugins/Makefile
plugins/avahi/Makefile
plugins/evolution/Makefile
plugins/gstreamer/Makefile
plugins/kab/Makefile
plugins/kde/Makefile
plugins/ldap/Makefile
plugins/loudmouth/Makefile
plugins/resource-list/Makefile
plugins/xcap/Makefile
])
AC_OUTPUT
dnl ###########################################################################
dnl Summary
dnl ###########################################################################
echo ""
echo "================ Final configuration ==================="
echo " Installing into prefix : $prefix"
echo ""
echo " H.323 support : $H323"
echo ""
if test "x${gm_platform}" != "xmingw" ; then
echo " GDU support : $GDU"
echo " Evolution-Data-Server support : $EDS"
echo ""
echo " Video4Linux support : $VIDEO4LINUX"
fi
if test "x${gm_platform}" = "xlinux" ; then
echo " GUDev support : $GUDEV"
fi
echo " LDAP support : $LDAP"
echo ""
if test "x${gm_platform}" != "xmingw" ; then
echo " DBUS support : $DBUS"
echo " DBUS service support : $DBUS_SERVICE"
echo " mDNS/DNS-SD (avahi) support : $AVAHI"
fi
echo ""
echo "The following features are experimental -- you've been warned:"
echo " GStreamer support : $GSTREAMER"
echo " KAddressBook support : $KAB"
echo " KDE support : $KDE"
echo " XCAP support : $XCAP"
echo " Loudmouth support : $LOUDMOUTH"
echo ""
echo " OS Type : $target_os"
echo " Machine Type : $target_cpu"
echo ""
echo " If all settings are OK, type make and make install"
echo "========================================================"