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
|
dnl ensure recent enough version of Autoconf
AC_PREREQ([2.69])
AC_CONFIG_MACRO_DIRS([m4])
dnl Use 'VERSION' files to get version.
m4_define([SIPE_VERSION_DATA], m4_include([VERSION]))
dnl Strip off newline characters.
m4_define([SIPE_VERSION],
m4_substr(SIPE_VERSION_DATA,
[0], m4_decr(m4_len(SIPE_VERSION_DATA))))
dnl homepage
m4_define([SIPE_HOMEPAGE], [http://sipe.sourceforge.net/])
dnl initialize package name, version, bugtracker & homepage
AC_INIT([pidgin-sipe], SIPE_VERSION,
[https://sourceforge.net/p/sipe/bugs/], [],
SIPE_HOMEPAGE)
AC_DEFINE([SIPE_TRANSLATIONS_URL],
["https://www.transifex.com/stefanb/pidgin-sipe/"],
[URL for submitting translations.])
dnl define optional git commit ID generated by autogen.sh
m4_define([SIPE_GIT_COMMIT], m4_sinclude([GITVERSION]))
AS_IF([test "x"SIPE_GIT_COMMIT != x],
[AC_MSG_NOTICE([set git commit])
AC_DEFINE(PACKAGE_GIT_COMMIT, "SIPE_GIT_COMMIT", [Define to the git commit for this package.])
])
dnl setup automake and require recent enough version
AM_INIT_AUTOMAKE([1.16 dist-bzip2 dist-xz no-define tar-ustar])
AC_CANONICAL_HOST
dnl set PACKAGE_URL for autoconf < 2.64
AS_IF([test "x${PACKAGE_URL}" = x],
[AC_MSG_NOTICE([set PACKAGE_URL for autoconf < 2.64])
AC_DEFINE(PACKAGE_URL, "SIPE_HOMEPAGE", [Define to the home page for this package.])
])
dnl set programming language
AC_LANG(C)
AM_PROG_CC_C_O
AM_PROG_LEX
AC_HEADER_STDC
dnl setup shared library generation
LT_INIT([disable-static])
dnl checks for tools
IT_PROG_INTLTOOL([0.41.0])
AC_PROG_INSTALL
dnl ******************************
dnl Win32
dnl ******************************
AC_MSG_CHECKING([for Win32])
AS_CASE(["$host"],
[*-mingw*], [os_win32=yes],
[os_win32=no])
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(SIPE_OS_WIN32, [test "x${os_win32}" = xyes])
dnl checks for header files
AC_CHECK_HEADERS([])
dnl checks for library functions
AC_CHECK_FUNCS([])
dnl tell pkgconfig to look in the same prefix where we're installing this to,
dnl as that is likely where libpurple will be found if it is not in the default
dnl pkgconfig path
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${libdir}/pkgconfig"
export PKG_CONFIG_PATH
dnl debug mode
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],
[compile with debugging support @<:@default=no@:>@])],
[],
[enable_debug=no])
AS_IF([test "x$enable_debug" = xyes],
[AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])])
AC_SUBST(DEBUG_CFLAGS)
dnl quality check mode
dnl For people who are interested in finding bugs and not hiding them
AC_ARG_ENABLE(quality-check,
[AS_HELP_STRING([--enable-quality-check],
[compile with compiler checks enabled @<:@default=yes@:>@])],
[],
[enable_quality_check=yes])
AS_IF([test "x$enable_quality_check" = xyes],
[dnl default quality configuration
QUALITY_CFLAGS="$QUALITY_CFLAGS -Werror -Wall"
dnl enable warnings supported by the GCC on the build system
dnl @TODO: not included in -Wall: "-Wwrite-strings" \
for newflag in \
"-Wextra" \
"-Waggregate-return" \
"-Wcast-align" \
"-Wcast-function-type" \
"-Wdeclaration-after-statement" \
"-Wdeprecated-declarations" \
"-Wduplicate-decl-specifier" \
"-Winit-self" \
"-Wmaybe-uninitialized" \
"-Wmissing-declarations" \
"-Wmissing-prototypes" \
"-Wnested-externs" \
"-Wpointer-arith" \
"-Wunused-but-set-variable" \
; do
ac_save_CFLAGS="$CFLAGS"
AC_MSG_CHECKING([if $CC supports $newflag])
CFLAGS="$CFLAGS $QUALITY_CFLAGS $newflag"
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[]])],
[AC_MSG_RESULT(yes)
QUALITY_CFLAGS="$QUALITY_CFLAGS $newflag"],
[AC_MSG_RESULT(no)]
)
CFLAGS="$ac_save_CFLAGS"
done
])
AC_SUBST(QUALITY_CFLAGS)
dnl check for availability of addition linker flags
for newflag in \
"-Wl,-Bsymbolic-functions" \
; do
ac_save_LDFLAGS="$LDFLAGS"
AC_MSG_CHECKING([if $CC supports $newflag])
LDFLAGS="$LDFLAGS $ADDITIONAL_LDFLAGS $newflag"
AC_LINK_IFELSE(
[AC_LANG_SOURCE([[
int main(int argc, char *argv[])
{
return(0);
}
]])],
[AC_MSG_RESULT(yes)
ADDITIONAL_LDFLAGS="$ADDITIONAL_LDFLAGS $newflag"],
[AC_MSG_RESULT(no)]
)
LDFLAGS="$ac_save_LDFLAGS"
done
AC_SUBST(ADDITIONAL_LDFLAGS)
dnl Check for pkg-config before using it
PKG_PROG_PKG_CONFIG
dnl check for valgrind (optional, only needed for debugging)
PKG_CHECK_MODULES(VALGRIND, [valgrind],
[AC_DEFINE(HAVE_VALGRIND, 1, [Define to 1 if you have the valgrind headers])],
[AC_MSG_RESULT(no)])
dnl build option: with AppStream support
AC_ARG_WITH(appstream,
[AC_HELP_STRING([--with-appstream],
[install AppStream XML file @<:@default=yes@:>@])],
[AS_IF([test "x$withval" = xno], [with_appstream=no])],
[with_appstream=yes])
AM_CONDITIONAL(SIPE_WITH_APPSTREAM, [test "x$with_appstream" != xno])
dnl build option: with voice & video support (for all backends)
AC_ARG_WITH(vv,
[AC_HELP_STRING([--with-vv],
[compile with voice and video support @<:@default=check@:>@])],
[AS_IF([test "x$withval" = xyes], [with_vv=yes])],
[with_vv=check])
dnl check for Kerberos 5 support
AC_ARG_WITH([krb5],
[AC_HELP_STRING([--with-krb5],
[compile with Kerberos 5 support @<:@default=check@:>@])],
[AS_IF([test "x$withval" = xyes], [with_krb5=check])],
[with_krb5=check])
AS_IF([test "x$with_krb5" = xno], [], dnl disabled by user
[test "x$with_krb5" = xcheck], dnl autodetect with krb5-config
[AC_MSG_CHECKING(if Kerberos 5 is available)
AS_IF([AC_RUN_LOG([krb5-config --version])],
[KRB5_CFLAGS=`krb5-config --cflags 2>/dev/null`
KRB5_LDFLAGS=""
dnl same as AC_CHECK_LIB()
LIBS="$LIBS `krb5-config --libs gssapi 2>/dev/null`"],
[AC_MSG_RESULT(no)
with_krb5=no])],
[ dnl path specified by user
KRB5_CFLAGS="-I${with_krb5}/include"
KRB5_LDFLAGS="-L${with_krb5}/lib"
])
AS_IF([test "x$with_krb5" != xno],
[ac_save_CFLAGS="$CFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS $KRB5_CFLAGS"
LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
AC_CHECK_HEADERS([gssapi/gssapi.h gssapi/gssapi_krb5.h],
[],
[AC_ERROR([GSSAPI headers not found])])
AC_CHECK_FUNC([gss_init_sec_context],
[],
[AC_ERROR([GSSAPI libraries not found])])
dnl older GSSAPI releases don't have gss_acquire_cred_with_passwd()
AC_CHECK_HEADER([gssapi/gssapi_ext.h],
[AC_CHECK_FUNC([gss_acquire_cred_with_password],
[AC_DEFINE(HAVE_GSSAPI_PASSWORD_SUPPORT, 1, [Define to 1 if gssapi has gss_acquire_cred_with_passwd()])],
[AC_MSG_NOTICE([gss_acquire_cred_with_passwd() required: disabling GSSAPI non-SSO support])])],
[AC_MSG_NOTICE([gssapi/gssapi_ext.h required: disabling GSSAPI non-SSO support])])
CFLAGS="$ac_save_CFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
])
AM_CONDITIONAL(SIP_SEC_GSSAPI, [test "x$with_krb5" != xno])
AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LDFLAGS)
dnl check for DBUS support
AC_ARG_WITH([dbus],
[AC_HELP_STRING([--with-dbus],
[compile with D-BUS support @<:@default=check@:>@])],
[AS_IF([test "x$withval" = xyes], [with_dbus=check])],
[with_dbus=check])
AS_IF([test "x$with_dbus" = xno], [], dnl disabled by user
[test "x$with_dbus" = xcheck], dnl autodetect with pkg-config
[PKG_CHECK_MODULES(DBUS, [dbus-1],
[with_dbus=yes],
[with_dbus=no])
])
AM_CONDITIONAL(SIPE_DBUS, [test "x$with_dbus" = xyes])
AS_IF([test "x$with_dbus" = xyes],
[AC_DEFINE(HAVE_DBUS, 1, [Define if D-BUS should be used in sipe.])])
AC_ARG_ENABLE(gssapi_only,
[AS_HELP_STRING([--enable-gssapi-only],
[disable all internal authentication code and only use
GSSAPI for authentication @<:@default=yes@:>@])],
[],
dnl requires Kerberos which provides GSSAPI
[enable_gssapi_only=$with_krb5])
AS_IF([test "x$enable_gssapi_only" != xno],
[AC_CHECK_HEADER([gssapi/gssapi_ntlmssp.h],
[AC_DEFINE(HAVE_GSSAPI_ONLY, 1, [Define to 1 to enable GSSAPI-only mode])],
[AC_MSG_NOTICE([gssapi/gssapi_ntlm.h required: falling back to internal authentication implementation])
enable_gssapi_only=no])
])
AM_CONDITIONAL(SIP_SEC_GSSAPI_ONLY, [test "x$enable_gssapi_only" != xno])
dnl
dnl oldest supported LTS release vs. package versions
dnl
dnl last checked: Jun-2019
dnl
dnl package | Debian | RHEL | SLES | Ubuntu | win32 |
dnl | 8.0 | 6.10 | 12 SP4 | 16.04 | 2.13.x |
dnl EOL | 07/2020 | 12/2020 | 11/2024 | 04/2021 | N/A |
dnl ---------------|---------|---------|---------|---------|--------|
dnl glib-2.0 | 2.42.x | 2.28.x | 2.48.x | 2.48.x | 2.18.x |
dnl gmime-2.6 | YES | NO | YES | YES | NO |
dnl gss-ntlmssp | NO | NO | NO | 0.7.x | N/A |
dnl intltool | 0.50.2 | 0.41.0 | 0.51.0 | 0.51.0 | 0.40.4 |
dnl nice | TOO OLD | TOO OLD | 0.1.13 | 0.1.13 | N/A |
dnl purple | 2.11.x | 2.7.x | 2.12.x | 2.10.x | 2.13.x |
dnl telepathy-glib | 0.24.x | NO | 0.24.x | 0.24.x | N/A |
dnl
dnl check for glib
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.18.0])
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.18.0])
dnl check for gmime
PKG_CHECK_MODULES(GMIME, [gmime-3.0 >= 3.0.0],
[ac_have_gmime=yes],
[PKG_CHECK_MODULES(GMIME, [gmime-2.6 >= 2.6.0],
[ac_have_gmime=yes],
[ac_have_gmime=no])
])
AM_CONDITIONAL(SIPE_MIME_GMIME, [test "x$ac_have_gmime" = xyes])
AS_IF([test "x$ac_have_gmime" = xyes],
[AC_DEFINE(HAVE_GMIME, 1, [Define if gmime should be used in sipe.])])
dnl check for NSS
AC_ARG_ENABLE(nss,
[AS_HELP_STRING([--enable-nss],
[use NSS as crypto backend @<:@default=yes@:>@])],
[],
[enable_nss=yes])
AS_IF([test "x$enable_nss" != xno],
[PKG_CHECK_MODULES(NSS, [nss],
[],
[PKG_CHECK_MODULES(NSS, [mozilla-nss],
[],
[PKG_CHECK_MODULES(NSS, [microb-engine-nss],
[],
[enable_nss=no])
])
])
])
dnl check for OpenSSL
AC_ARG_ENABLE(openssl,
[AS_HELP_STRING([--enable-openssl],
[use OpenSSL as crypto backend @<:@default=yes@:>@])],
[],
[enable_openssl=yes])
AS_IF([test "x$enable_openssl" != xno],
[PKG_CHECK_MODULES(OPENSSL, [libcrypto],
[],
[enable_openssl=no])
])
AS_IF(
[test "x$enable_nss" != xno],
[ dnl NSS has priority over OpenSSL
enable_openssl=no
AC_MSG_NOTICE([using NSS as crypto backend.])],
[test "x$enable_openssl" != xno],
[AC_MSG_NOTICE([using OpenSSL as crypto backend.])],
[AC_ERROR([nss, mozilla-nss, microb-engine-nss or libcrypto package is required])])
AM_CONDITIONAL(SIPE_OPENSSL, [test "x$enable_openssl" != xno])
dnl check for libxml2
PKG_CHECK_MODULES(LIBXML2, [libxml-2.0])
dnl assumption check: sizof(uuid_t) must be 16 (see uuid.c)
AC_MSG_CHECKING([that sizeof(uuid_t) is 16])
ac_save_CFLAGS="$CFLAGS"
dnl NOTE: including $QUALITY_CFLAGS can lead to false negative configure checks!
CFLAGS="$CFLAGS $GLIB_CFLAGS"
dnl note the [[[ quoting: our code contains []!
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <glib.h>
#include <stdio.h>
/* Copied from uuid.c */
typedef struct {
guint32 time_low;
guint16 time_mid;
guint16 time_hi_and_version;
guint8 clock_seq_hi_and_reserved;
guint8 clock_seq_low;
guint8 node[6];
} uuid_t;
]],
[[if (sizeof(uuid_t) == 16) {
return(0);
} else {
printf("\n\nOoops, sizeof(uuid_t) is %" G_GSIZE_FORMAT ".\n\n", sizeof(uuid_t));
return(1);
}]])],
[AC_MSG_RESULT(yes)],
[AC_MSG_FAILURE([sizeof(uuid_t) is not 16
Please notify the SIPE developers.
Copy & paste all lines starting with the line
checking that sizeof(uuid_t) is 16...
to the report and attach the file "config.log".
Compiler information:
host: $host
build: $build
compiler: $CC
])],
[AC_MSG_WARN([cross compiling: not checking])])
CFLAGS="$ac_save_CFLAGS"
dnl build option: OCS2005 client hack
AC_ARG_ENABLE([ocs2005-message-hack],
[AC_HELP_STRING([--enable-ocs2005-message-hack], [disable message timeout for OCS2005 clients
which causes "false" not delivered error messages
@<:@default=no@:>@])],
[AC_DEFINE([ENABLE_OCS2005_MESSAGE_HACK], [1],
[Define to 1 to disable SIP MESSAGE timeout feature.
OCS2005 clients don't seem to acknowledge MESSAGEs and
disabling the timeout suppresses "false" error messages])])
dnl build option: purple backend
AC_ARG_ENABLE([purple],
[AC_HELP_STRING([--enable-purple], [build purple plugin @<:@default=yes@:>@])],
[],
[enable_purple=yes])
ac_have_appshare=no
ac_have_appshare_server=no
ac_have_xdata=no
with_purple_vv=no
AS_IF([test "x$enable_purple" != xno],
[PKG_CHECK_MODULES(PURPLE, [purple-3],
[purple_pkgconfig=purple-3],
[PKG_CHECK_MODULES(PURPLE, [purple >= 2.7.0],
[purple_pkgconfig=purple],
[enable_purple=no])])
AS_IF([test "x$enable_purple" != xno],
[AC_MSG_NOTICE([using package "$purple_pkgconfig".])
dnl unfortunately PURPLE_MAJOR_VERSION is not exported by purple.m4
PURPLE_MAJOR_VERSION=`$PKG_CONFIG --modversion $purple_pkgconfig | cut -d. -f 1`
AC_SUBST(PURPLE_MAJOR_VERSION)
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
dnl NOTE: including $QUALITY_CFLAGS can lead to false negative configure checks!
CFLAGS="$CFLAGS $PURPLE_CFLAGS"
LIBS="$LIBS $PURPLE_LIBS"
dnl check whether enable voice and video support
AS_IF([test "x$with_vv" = xno], [], dnl disabled by user
[AC_MSG_CHECKING(for purple voice and video support)
purple_has_media=no
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <media.h>
]],
[[return (purple_media_get_type() == G_TYPE_NONE ? 1 : 0);]]
)],
[purple_has_media=yes
AC_MSG_RESULT(ok)
],
[AC_MSG_RESULT([no - your purple hasn't been compiled with voice and video support.])],
[AS_IF([test "x$with_vv" = xyes],
[purple_has_media=yes
AC_MSG_RESULT([yes - enabling voice and video support for cross compiling on users' request.])],
[AC_MSG_RESULT([no - disabled for cross compiling.])])
]
)
AS_IF([test "x$purple_has_media" = xyes],
[PKG_CHECK_MODULES(NICE, [nice >= 0.1.0],
dnl sipe-media.c uses g_slist_free_full()
[PKG_CHECK_MODULES(_SIPE_MEDIA_RECHECK_PLEASE_IGNORE, [$purple_pkgconfig >= 2.8.0],
dnl check purple pkgconfig for gstreamer version
[gstreamer_pkgconfig=`$PKG_CONFIG --variable=gstreamer $purple_pkgconfig`
AS_IF([test "x$gstreamer_pkgconfig" == x],
[AS_IF([test "x$purple_pkgconfig" == xpurple-3],
[gstreamer_pkgconfig=1.0])])
AS_IF([test "x$gstreamer_pkgconfig" == x1.0],
[gstreamer_pkgconfig="gstreamer-$gstreamer_pkgconfig gstreamer-rtp-$gstreamer_pkgconfig"
AC_MSG_NOTICE([using packages "$gstreamer_pkgconfig".])
PKG_CHECK_MODULES(GSTREAMER, [$gstreamer_pkgconfig],
[PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2],
[with_purple_vv=yes
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <media.h>
]],
[[return (PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE);]]
)],
[AC_DEFINE(HAVE_PURPLE_NEW_TCP_ENUMS, 1, [Define if libpurple has new TCP enums in media backend.])]
)],
[AC_MSG_NOTICE(Farstream required: disabling purple voice and video support)])],
[AC_MSG_NOTICE(GStreamer required: disabling purple voice and video support)])],
[AC_MSG_NOTICE(your purple hasn't been compiled against GStreamer 1.0: disabling purple voice and video support)])],
[AC_MSG_NOTICE(libpurple >= 2.8.0 required: disabling purple voice and video support)])],
[AC_MSG_NOTICE(libnice required: disabling purple voice and video support)])
])
])
dnl SRTP and XDATA require media backend
AS_IF([test "x$with_purple_vv" != xno],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <media.h>
]],
[[purple_media_set_encryption_parameters(NULL, "", "", "", "", 0);
purple_media_set_decryption_parameters(NULL, "", "", "", "", "", 0);]]
)],
[AC_DEFINE(HAVE_SRTP, 1, [Define if we have SRTP support in media backend.])]
)
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <media.h>
]],
[[return (PURPLE_MEDIA_APPLICATION);]]
)],
[dnl libpurple supports raw data RTP connections
ac_have_xdata=yes
dnl gio-2.0 is mandatory for application sharing support
PKG_CHECK_MODULES(GIO, [gio-2.0],
[ac_have_appshare=yes
dnl freerdp-shadow2 & winpr2 is mandatory for appshare server support
PKG_CHECK_MODULES(FREERDP_SHADOW, [freerdp-shadow2 winpr2],
[ac_have_appshare_server=yes],
[ac_have_appshare_server=no])
])
]
)
],
[AS_IF([test "x$with_vv" = xyes], dnl explicitly requested by user
[AC_ERROR([Voice and video support explicitly requested, but not available])]
)]
)
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"])])
AM_CONDITIONAL(SIPE_INCLUDE_PURPLE, [test "x$enable_purple" != xno])
AM_CONDITIONAL(SIPE_PURPLE3, [test "x$purple_pkgconfig" = xpurple-3])
dnl build option: telepathy backend
AC_ARG_ENABLE([telepathy],
[AC_HELP_STRING([--enable-telepathy], [build telepathy plugin @<:@default=yes@:>@])],
[],
[enable_telepathy=yes])
AS_IF([test "x$enable_telepathy" != xno],
[PKG_CHECK_MODULES(TELEPATHY_GLIB, [telepathy-glib >= 0.24.0],
[dnl GMIME is a build requirement
AS_IF([test "x$ac_have_gmime" = xyes],
[],
[AC_ERROR(GMIME package is required for telepathy plugin)])
dnl telepathy is based on GObject & D-Bus GLib
PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1])
dnl telepathy uses from gio:
dnl - GIOStream (>= 2.22.0)
dnl - GResolver (>= 2.22.0)
dnl - GSocketClient (>= 2.32.0)
dnl - GTlsConnection (>= 2.28.0)
PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.32.0])
],
[enable_telepathy=no])])
AM_CONDITIONAL(SIPE_INCLUDE_TELEPATHY, [test "x$enable_telepathy" != xno])
dnl sanity check
AS_IF([test "x$enable_purple" = xno -a "x$enable_telepathy" = xno],
[AC_ERROR(at least one plugin must be selected
If you didn't use a --enable option then please check that you have
the headers for the packages "purple" or "telepathy-glib" installed.
)],
[])
dnl enable voice & video support if any backend supports it
AS_IF([test "x$with_purple_vv" != xno],
[AC_DEFINE(HAVE_VV, 1, [Define if voice & video is enabled.])])
AM_CONDITIONAL(SIPE_WITH_VV, [test "x$with_purple_vv" != xno])
dnl raw data RTP streams enable Lync file transfer
AM_CONDITIONAL(SIPE_HAVE_XDATA, [test "x$ac_have_xdata" == xyes])
AS_IF([test "x$ac_have_xdata" == xyes],
[AC_DEFINE(HAVE_XDATA, 1, [Define if we have raw data RTP in media backend.])])
dnl enable appshare support
AM_CONDITIONAL(SIPE_HAVE_APPSHARE, [test "x$ac_have_appshare" == xyes])
AS_IF([test "x$ac_have_appshare" == xyes],
[AC_DEFINE(HAVE_APPSHARE, 1, [Define to 1 if we have appshare support.])])
dnl RDP server for sharing local desktop
AM_CONDITIONAL(SIPE_HAVE_APPSHARE_SERVER, [test "x$ac_have_appshare_server" = xyes])
AS_IF([test "x$ac_have_appshare_server" == xyes],
[AC_DEFINE(HAVE_APPSHARE_SERVER, 1, [Define if appshare server is enabled.])])
dnl libpurple API relies on GParameter (deprecated in glib-2.0 >= 2.62.0)
AS_IF([test "x$enable_purple" != xno],
[AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_60,
[We need GParameter for which no replacement is available])
])
dnl telepathy code parts rely on interfaces that require GValueArray. This
dnl type has been declared "deprectated" in glib-2.0 >= 2.32.0, but there
dnl is no backward compatible replacement implementation possible
dnl telepathy-glib API relies on GTimeVal (deprecated in glib-2.0 >= 2.62.0)
AS_IF([test "x$enable_telepathy" != xno],
[AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30,
[We need GValueArray for which no replacement is available])
])
dnl libpurple 2.x API relies on G_CONST_RETURN (deprecated in glib-2.0 >= 2.30.0)
AS_IF([test "x$purple_pkgconfig" == xpurple],
[AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_28,
[libpurple 2.x API uses G_CONST_RETURN])
])
dnl i18n
AC_MSG_CHECKING([locale_CPPFLAGS])
LOCALE_CPPFLAGS='-DLOCALEDIR=\"$(datadir)/locale\"'
AC_SUBST([LOCALE_CPPFLAGS])
AC_MSG_RESULT([$LOCALE_CPPFLAGS])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
AC_SUBST(GETTEXT_PACKAGE, "${PACKAGE_NAME}")
dnl substitutions and generated files
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
pixmaps/Makefile
po/Makefile.in
pixmaps/16/Makefile
pixmaps/22/Makefile
pixmaps/24/Makefile
pixmaps/32/Makefile
pixmaps/48/Makefile
pixmaps/scalable/Makefile
src/Makefile
src/core/Makefile
src/api/Makefile
src/purple/Makefile
src/telepathy/Makefile
src/telepathy/data/Makefile
])
dnl generate files
AC_OUTPUT()
dnl additional info for the user
AS_ECHO()
AS_IF([test "x$enable_purple" = xno],
[AS_ECHO("Not building purple plugin")],
[AS_ECHO("Build purple plugin")
AS_ECHO("PURPLE_CFLAGS : $PURPLE_CFLAGS")
AS_ECHO("PURPLE_LIBS : $PURPLE_LIBS")
AS_ECHO_N("Voice and video: ")
AS_IF([test "x$with_purple_vv" = xno],
[AS_ECHO("disabled")],
[AS_ECHO("enabled")])
])
AS_ECHO()
AS_IF([test "x$enable_telepathy" = xno],
[AS_ECHO("Not building telepathy plugin")],
[AS_ECHO("Build telepathy plugin")
AS_ECHO("TELEPATHY_GLIB_CFLAGS: $TELEPATHY_GLIB_CFLAGS")
AS_ECHO("TELEPATHY_GLIB_LIBS : $TELEPATHY_GLIB_LIBS")])
AS_ECHO()
AS_IF([test "x$with_krb5" = xno],
[AS_ECHO("Not building with Kerberos 5 support")],
[AS_ECHO("Build with Kerberos 5 support")
AS_ECHO("KRB5_CFLAGS : $KRB5_CFLAGS")
AS_ECHO("KRB5_LDFLAGS : $KRB5_LDFLAGS")])
AS_ECHO()
AS_IF([test "x$enable_gssapi_only" = xno],
[AS_ECHO("Using internal authentication implementation")],
[AS_ECHO("Using only GSSAPI for authentication")])
AS_ECHO()
AS_IF([test "x$enable_debug" = xno],
[AS_ECHO("Debugging not enabled")],
[AS_ECHO("Build with debugging enabled")
AS_ECHO("DEBUG_CFLAGS : $DEBUG_CFLAGS")])
AS_ECHO()
AS_IF([test "x$QUALITY_CFLAGS" = x],
[AS_ECHO("Compiler checks disabled")],
[AS_ECHO("Build with compiler checks enabled")
AS_ECHO("QUALITY_CFLAGS : $QUALITY_CFLAGS")])
AS_ECHO()
AS_ECHO("configure complete. Now run 'make'")
AS_ECHO()
dnl The End.
|