diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-02 12:54:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-02 12:54:25 +0000 |
commit | 5b82f1062147ef5da89971d515d93fd4df8cd40d (patch) | |
tree | 8284c8f5e95b55d9ddfda3d1f03ad6f140742d1f | |
parent | 42b829bb6005f07403370931509d0f83b4235e15 (diff) | |
download | gnunet-5b82f1062147ef5da89971d515d93fd4df8cd40d.tar.gz gnunet-5b82f1062147ef5da89971d515d93fd4df8cd40d.zip |
-add configure tests for opus/pulseaudio for conversation
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | configure.ac | 43 | ||||
-rw-r--r-- | src/Makefile.am | 7 | ||||
-rw-r--r-- | src/conversation/Makefile.am | 11 | ||||
-rw-r--r-- | src/include/gnunet_namestore_service.h | 2 |
5 files changed, 61 insertions, 4 deletions
@@ -51,6 +51,8 @@ These are the direct dependencies for running GNUnet: | |||
51 | - sqlite >= 3.0 (default database) | 51 | - sqlite >= 3.0 (default database) |
52 | - mysql >= 5.1 (alternative to sqLite) | 52 | - mysql >= 5.1 (alternative to sqLite) |
53 | - postgres >= 8.3 (alternative to sqLite) | 53 | - postgres >= 8.3 (alternative to sqLite) |
54 | - libopus >= 0.9.14 (optional for experimental conversation tool) | ||
55 | - libpulse >= 2.0 (optional for experimental conversation tool) | ||
54 | 56 | ||
55 | Recommended autotools for compiling the SVN version are: | 57 | Recommended autotools for compiling the SVN version are: |
56 | - autoconf >= 2.59 | 58 | - autoconf >= 2.59 |
diff --git a/configure.ac b/configure.ac index c2d9bbcb5..79e64ca5e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -360,7 +360,7 @@ fi # $build = $target | |||
360 | 360 | ||
361 | # check for bluetooth library | 361 | # check for bluetooth library |
362 | bluetooth=0 | 362 | bluetooth=0 |
363 | AC_CHECK_LIB(bluetooth, ba2str, bluetooth=1, bluetooth=0) | 363 | AC_CHECK_LIB(bluetooth, ba2str,[AC_CHECK_HEADER([bluetooth/bluetooth.h],bluetooth=1)]) |
364 | if test "$bluetooth" = 1 | 364 | if test "$bluetooth" = 1 |
365 | then | 365 | then |
366 | AM_CONDITIONAL(HAVE_LIBBLUETOOTH, true) | 366 | AM_CONDITIONAL(HAVE_LIBBLUETOOTH, true) |
@@ -373,6 +373,34 @@ then | |||
373 | bluetooth=1 | 373 | bluetooth=1 |
374 | fi | 374 | fi |
375 | 375 | ||
376 | # check for libpulse(audio) library | ||
377 | pulse=0 | ||
378 | AC_CHECK_LIB(pulse,pa_stream_peak, | ||
379 | [AC_CHECK_HEADER([pulse/simple.h],pulse=1)]) | ||
380 | if test "$pulse" = 1 | ||
381 | then | ||
382 | AM_CONDITIONAL(HAVE_PULSE, true) | ||
383 | AC_DEFINE([HAVE_PULSE],[1],[Have libpulse(audio) library]) | ||
384 | else | ||
385 | AM_CONDITIONAL(HAVE_PULSE, false) | ||
386 | fi | ||
387 | if test "$build_target" = "mingw" | ||
388 | then | ||
389 | pulse=0 | ||
390 | fi | ||
391 | |||
392 | # check for libopus(audio) library | ||
393 | opus=0 | ||
394 | AC_CHECK_LIB(opus,opus_decode_float, | ||
395 | [AC_CHECK_HEADER([opus/opus.h],opus=1)]) | ||
396 | if test "$opus" = 1 | ||
397 | then | ||
398 | AM_CONDITIONAL(HAVE_OPUS, true) | ||
399 | AC_DEFINE([HAVE_OPUS],[1],[Have libopus library]) | ||
400 | else | ||
401 | AM_CONDITIONAL(HAVE_OPUS, false) | ||
402 | fi | ||
403 | |||
376 | 404 | ||
377 | # libcurl | 405 | # libcurl |
378 | LIBCURL_CHECK_CONFIG(,7.21.3,curl=1,curl=0) | 406 | LIBCURL_CHECK_CONFIG(,7.21.3,curl=1,curl=0) |
@@ -1440,11 +1468,24 @@ then | |||
1440 | AC_MSG_NOTICE([NOTICE: opening ports for gnunet-java bindings by default.]) | 1468 | AC_MSG_NOTICE([NOTICE: opening ports for gnunet-java bindings by default.]) |
1441 | fi | 1469 | fi |
1442 | 1470 | ||
1471 | # MHD | ||
1443 | if test "x$lmhd" != "x1" | 1472 | if test "x$lmhd" != "x1" |
1444 | then | 1473 | then |
1445 | AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.]) | 1474 | AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.]) |
1446 | fi | 1475 | fi |
1447 | 1476 | ||
1477 | # Pulse Audio | ||
1478 | if test "x$pulse" != "x1" | ||
1479 | then | ||
1480 | AC_MSG_NOTICE([NOTICE: libpulse(audio) not found, conversation will not be built.]) | ||
1481 | fi | ||
1482 | |||
1483 | # Opus | ||
1484 | if test "x$opus" != "x1" | ||
1485 | then | ||
1486 | AC_MSG_NOTICE([NOTICE: libopus not found, conversation will not be built.]) | ||
1487 | fi | ||
1488 | |||
1448 | AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) | 1489 | AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) |
1449 | 1490 | ||
1450 | if test "$enable_framework_build" = "yes" | 1491 | if test "$enable_framework_build" = "yes" |
diff --git a/src/Makefile.am b/src/Makefile.am index bd039325a..97b643f5c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -16,10 +16,15 @@ if HAVE_EXPERIMENTAL | |||
16 | multicast \ | 16 | multicast \ |
17 | env \ | 17 | env \ |
18 | psyc \ | 18 | psyc \ |
19 | conversation \ | ||
20 | $(CONSENSUS) \ | 19 | $(CONSENSUS) \ |
21 | $(EXPERIMENTATION) | 20 | $(EXPERIMENTATION) |
22 | # NOTE: scalarproduct is not being listed here yet as the crypto is being reworked at the moment | 21 | # NOTE: scalarproduct is not being listed here yet as the crypto is being reworked at the moment |
22 | if HAVE_PULSE | ||
23 | if HAVE_OPUS | ||
24 | EXP_DIR += conversation | ||
25 | endif | ||
26 | endif | ||
27 | |||
23 | endif | 28 | endif |
24 | 29 | ||
25 | if HAVE_MYSQL | 30 | if HAVE_MYSQL |
diff --git a/src/conversation/Makefile.am b/src/conversation/Makefile.am index de5c5ace7..b5dc0d49b 100644 --- a/src/conversation/Makefile.am +++ b/src/conversation/Makefile.am | |||
@@ -31,9 +31,18 @@ libgnunetconversation_la_LDFLAGS = \ | |||
31 | 31 | ||
32 | bin_PROGRAMS = gnunet-conversation | 32 | bin_PROGRAMS = gnunet-conversation |
33 | 33 | ||
34 | libexec_PROGRAMS = gnunet-service-conversation \ | 34 | libexec_PROGRAMS = \ |
35 | gnunet-service-conversation | ||
36 | |||
37 | if HAVE_PULSE | ||
38 | if HAVE_OPUS | ||
39 | libexec_PROGRAMS += | ||
35 | gnunet-helper-audio-record \ | 40 | gnunet-helper-audio-record \ |
36 | gnunet-helper-audio-playback | 41 | gnunet-helper-audio-playback |
42 | endif | ||
43 | endif | ||
44 | |||
45 | |||
37 | 46 | ||
38 | check_PROGRAMS = \ | 47 | check_PROGRAMS = \ |
39 | test_conversation_api | 48 | test_conversation_api |
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index 640bd6c02..4b3a6fcb9 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h | |||
@@ -724,7 +724,7 @@ GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | |||
724 | 724 | ||
725 | /** | 725 | /** |
726 | * Returns the expiration time of the given block of records. The block | 726 | * Returns the expiration time of the given block of records. The block |
727 | * expiration time is the expiration time of the block with smallest | 727 | * expiration time is the expiration time of the record with smallest |
728 | * expiration time. | 728 | * expiration time. |
729 | * | 729 | * |
730 | * @param rd_count number of records given in @a rd | 730 | * @param rd_count number of records given in @a rd |