diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 79 |
1 files changed, 52 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac index 62bb91bd..2b4fad78 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -13,8 +13,7 @@ AC_CONFIG_MACRO_DIR([m4]) | |||
13 | EXTRA_LT_LDFLAGS= | 13 | EXTRA_LT_LDFLAGS= |
14 | 14 | ||
15 | LIBTOXCORE_LT_VERSION=0:0:0 | 15 | LIBTOXCORE_LT_VERSION=0:0:0 |
16 | LIBTOXMSI_LT_VERSION=0:0:0 | 16 | LIBTOXAV_LT_VERSION=0:0:0 |
17 | LIBTOXRTP_LT_VERSION=0:0:0 | ||
18 | dnl | 17 | dnl |
19 | dnl current:revision:age | 18 | dnl current:revision:age |
20 | dnl | 19 | dnl |
@@ -24,12 +23,10 @@ dnl incremented | |||
24 | dnl age: increment if interfaces have been added, set to zero if | 23 | dnl age: increment if interfaces have been added, set to zero if |
25 | dnl interfaces have been removed or changed | 24 | dnl interfaces have been removed or changed |
26 | TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" | 25 | TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" |
27 | TOXMSI_LT_LDFLAGS="-version-info $LIBTOXMSI_LT_VERSION" | 26 | TOXAV_LT_LDFLAGS="-version-info $LIBTOXAV_LT_VERSION" |
28 | TOXRTP_LT_LDFLAGS="-version-info $LIBTOXMSI_LT_VERSION" | ||
29 | 27 | ||
30 | AC_SUBST(TOXCORE_LT_LDFLAGS) | 28 | AC_SUBST(TOXCORE_LT_LDFLAGS) |
31 | AC_SUBST(TOXMSI_LT_LDFLAGS) | 29 | AC_SUBST(TOXAV_LT_LDFLAGS) |
32 | AC_SUBST(TOXRTP_LT_LDFLAGS) | ||
33 | 30 | ||
34 | if test "x${prefix}" = "xNONE"; then | 31 | if test "x${prefix}" = "xNONE"; then |
35 | prefix="${ac_default_prefix}" | 32 | prefix="${ac_default_prefix}" |
@@ -39,6 +36,7 @@ BUILD_DHT_BOOTSTRAP_DAEMON="yes" | |||
39 | BUILD_NTOX="yes" | 36 | BUILD_NTOX="yes" |
40 | BUILD_TESTS="yes" | 37 | BUILD_TESTS="yes" |
41 | BUILD_AV="yes" | 38 | BUILD_AV="yes" |
39 | BUILD_PHONE="yes" | ||
42 | BUILD_TESTING="yes" | 40 | BUILD_TESTING="yes" |
43 | 41 | ||
44 | NCURSES_FOUND="no" | 42 | NCURSES_FOUND="no" |
@@ -64,12 +62,24 @@ AC_ARG_ENABLE([av], | |||
64 | [ | 62 | [ |
65 | if test "x$enableval" = "xno"; then | 63 | if test "x$enableval" = "xno"; then |
66 | BUILD_AV="no" | 64 | BUILD_AV="no" |
65 | BUILD_PHONE="no" | ||
67 | elif test "x$enableval" = "xyes"; then | 66 | elif test "x$enableval" = "xyes"; then |
68 | BUILD_AV="yes" | 67 | BUILD_AV="yes" |
69 | fi | 68 | fi |
70 | ] | 69 | ] |
71 | ) | 70 | ) |
72 | 71 | ||
72 | AC_ARG_ENABLE([phone], | ||
73 | [AC_HELP_STRING([--disable-phone], [build test phone (default: auto)]) ], | ||
74 | [ | ||
75 | if test "x$enableval" = "xno"; then | ||
76 | BUILD_PHONE="no" | ||
77 | elif test "x$enableval" = "xyes"; then | ||
78 | BUILD_PHONE="yes" | ||
79 | fi | ||
80 | ] | ||
81 | ) | ||
82 | |||
73 | AC_ARG_ENABLE([tests], | 83 | AC_ARG_ENABLE([tests], |
74 | [AC_HELP_STRING([--disable-tests], [build unit tests (default: auto)]) ], | 84 | [AC_HELP_STRING([--disable-tests], [build unit tests (default: auto)]) ], |
75 | [ | 85 | [ |
@@ -333,6 +343,7 @@ AC_TYPE_UINT16_T | |||
333 | AC_TYPE_UINT32_T | 343 | AC_TYPE_UINT32_T |
334 | AC_TYPE_UINT64_T | 344 | AC_TYPE_UINT64_T |
335 | AC_TYPE_UINT8_T | 345 | AC_TYPE_UINT8_T |
346 | AC_C_BIGENDIAN | ||
336 | 347 | ||
337 | # Checks for library functions. | 348 | # Checks for library functions. |
338 | AC_FUNC_FORK | 349 | AC_FUNC_FORK |
@@ -344,76 +355,77 @@ if test "x$BUILD_AV" = "xyes"; then | |||
344 | [ | 355 | [ |
345 | AC_MSG_WARN([disabling AV support: required pthread library not found]) | 356 | AC_MSG_WARN([disabling AV support: required pthread library not found]) |
346 | BUILD_AV="no" | 357 | BUILD_AV="no" |
358 | BUILD_PHONE="no" | ||
347 | ] | 359 | ] |
348 | ) | 360 | ) |
349 | fi | 361 | fi |
350 | 362 | ||
351 | if test "x$BUILD_AV" = "xyes"; then | 363 | if test "x$BUILD_PHONE" = "xyes"; then |
352 | PKG_CHECK_MODULES([AVFORMAT], [libavformat], | 364 | PKG_CHECK_MODULES([AVFORMAT], [libavformat], |
353 | [], | 365 | [], |
354 | [ | 366 | [ |
355 | AC_MSG_WARN([disabling AV support $AVFORMAT_PKG_ERRORS]) | 367 | AC_MSG_WARN([disabling phone $AVFORMAT_PKG_ERRORS]) |
356 | BUILD_AV="no" | 368 | BUILD_PHONE="no" |
357 | ] | 369 | ] |
358 | ) | 370 | ) |
359 | fi | 371 | fi |
360 | 372 | ||
361 | if test "x$BUILD_AV" = "xyes"; then | 373 | if test "x$BUILD_PHONE" = "xyes"; then |
362 | PKG_CHECK_MODULES([AVCODEC], [libavcodec], | 374 | PKG_CHECK_MODULES([AVCODEC], [libavcodec], |
363 | [], | 375 | [], |
364 | [ | 376 | [ |
365 | AC_MSG_WARN([disabling AV support $AVCODEC_PKG_ERRORS]) | 377 | AC_MSG_WARN([disabling phone $AVCODEC_PKG_ERRORS]) |
366 | BUILD_AV="no" | 378 | BUILD_PHONE="no" |
367 | ] | 379 | ] |
368 | ) | 380 | ) |
369 | fi | 381 | fi |
370 | 382 | ||
371 | if test "x$BUILD_AV" = "xyes"; then | 383 | if test "x$BUILD_PHONE" = "xyes"; then |
372 | PKG_CHECK_MODULES([AVUTIL], [libavutil], | 384 | PKG_CHECK_MODULES([AVUTIL], [libavutil], |
373 | [], | 385 | [], |
374 | [ | 386 | [ |
375 | AC_MSG_WARN([disabling AV support $AVUTIL_PKG_ERRORS]) | 387 | AC_MSG_WARN([disabling phone $AVUTIL_PKG_ERRORS]) |
376 | BUILD_AV="no" | 388 | BUILD_PHONE="no" |
377 | ] | 389 | ] |
378 | ) | 390 | ) |
379 | fi | 391 | fi |
380 | 392 | ||
381 | if test "x$BUILD_AV" = "xyes"; then | 393 | if test "x$BUILD_PHONE" = "xyes"; then |
382 | PKG_CHECK_MODULES([AVDEVICE], [libavdevice], | 394 | PKG_CHECK_MODULES([AVDEVICE], [libavdevice], |
383 | [], | 395 | [], |
384 | [ | 396 | [ |
385 | AC_MSG_WARN([disabling AV support $AVDEVICE_PKG_ERRORS]) | 397 | AC_MSG_WARN([disabling phone $AVDEVICE_PKG_ERRORS]) |
386 | BUILD_AV="no" | 398 | BUILD_PHONE="no" |
387 | ] | 399 | ] |
388 | ) | 400 | ) |
389 | fi | 401 | fi |
390 | 402 | ||
391 | if test "x$BUILD_AV" = "xyes"; then | 403 | if test "x$BUILD_PHONE" = "xyes"; then |
392 | PKG_CHECK_MODULES([SWSCALE], [libswscale], | 404 | PKG_CHECK_MODULES([SWSCALE], [libswscale], |
393 | [], | 405 | [], |
394 | [ | 406 | [ |
395 | AC_MSG_WARN([disabling AV support $SWSCALE_PKG_ERRORS]) | 407 | AC_MSG_WARN([disabling phone $SWSCALE_PKG_ERRORS]) |
396 | BUILD_AV="no" | 408 | BUILD_PHONE="no" |
397 | ] | 409 | ] |
398 | ) | 410 | ) |
399 | fi | 411 | fi |
400 | 412 | ||
401 | if test "x$BUILD_AV" = "xyes"; then | 413 | if test "x$BUILD_PHONE" = "xyes"; then |
402 | PKG_CHECK_MODULES([SDL], [sdl], | 414 | PKG_CHECK_MODULES([SDL], [sdl], |
403 | [], | 415 | [], |
404 | [ | 416 | [ |
405 | AC_MSG_WARN([disabling AV support $SDL_PKG_ERRORS]) | 417 | AC_MSG_WARN([disabling phone $SDL_PKG_ERRORS]) |
406 | BUILD_AV="no" | 418 | BUILD_PHONE="no" |
407 | ] | 419 | ] |
408 | ) | 420 | ) |
409 | fi | 421 | fi |
410 | 422 | ||
411 | if test "x$BUILD_AV" = "xyes"; then | 423 | if test "x$BUILD_PHONE" = "xyes"; then |
412 | PKG_CHECK_MODULES([OPENAL], [openal], | 424 | PKG_CHECK_MODULES([OPENAL], [openal], |
413 | [], | 425 | [], |
414 | [ | 426 | [ |
415 | AC_MSG_WARN([disabling AV support $OPENAL_PKG_ERRORS]) | 427 | AC_MSG_WARN([disabling phone $OPENAL_PKG_ERRORS]) |
416 | BUILD_AV="no" | 428 | BUILD_PHONE="no" |
417 | ] | 429 | ] |
418 | ) | 430 | ) |
419 | fi | 431 | fi |
@@ -424,6 +436,18 @@ if test "x$BUILD_AV" = "xyes"; then | |||
424 | [ | 436 | [ |
425 | AC_MSG_WARN([disabling AV support $OPUS_PKG_ERRORS]) | 437 | AC_MSG_WARN([disabling AV support $OPUS_PKG_ERRORS]) |
426 | BUILD_AV="no" | 438 | BUILD_AV="no" |
439 | BUILD_PHONE="no" | ||
440 | ] | ||
441 | ) | ||
442 | fi | ||
443 | |||
444 | if test "x$BUILD_AV" = "xyes"; then | ||
445 | PKG_CHECK_MODULES([VPX], [vpx], | ||
446 | [], | ||
447 | [ | ||
448 | AC_MSG_WARN([disabling AV support $VPX_PKG_ERRORS]) | ||
449 | BUILD_AV="no" | ||
450 | BUILD_PHONE="no" | ||
427 | ] | 451 | ] |
428 | ) | 452 | ) |
429 | fi | 453 | fi |
@@ -586,6 +610,7 @@ AM_CONDITIONAL(BUILD_DHT_BOOTSTRAP_DAEMON, test "x$BUILD_DHT_BOOTSTRAP_DAEMON" = | |||
586 | AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes") | 610 | AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes") |
587 | AM_CONDITIONAL(BUILD_NTOX, test "x$BUILD_NTOX" = "xyes") | 611 | AM_CONDITIONAL(BUILD_NTOX, test "x$BUILD_NTOX" = "xyes") |
588 | AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes") | 612 | AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes") |
613 | AM_CONDITIONAL(BUILD_PHONE, test "x$BUILD_PHONE" = "xyes") | ||
589 | AM_CONDITIONAL(BUILD_TESTING, test "x$BUILD_TESTING" = "xyes") | 614 | AM_CONDITIONAL(BUILD_TESTING, test "x$BUILD_TESTING" = "xyes") |
590 | AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes") | 615 | AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes") |
591 | 616 | ||