aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-02 12:54:25 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-02 12:54:25 +0000
commit5b82f1062147ef5da89971d515d93fd4df8cd40d (patch)
tree8284c8f5e95b55d9ddfda3d1f03ad6f140742d1f
parent42b829bb6005f07403370931509d0f83b4235e15 (diff)
downloadgnunet-5b82f1062147ef5da89971d515d93fd4df8cd40d.tar.gz
gnunet-5b82f1062147ef5da89971d515d93fd4df8cd40d.zip
-add configure tests for opus/pulseaudio for conversation
-rw-r--r--README2
-rw-r--r--configure.ac43
-rw-r--r--src/Makefile.am7
-rw-r--r--src/conversation/Makefile.am11
-rw-r--r--src/include/gnunet_namestore_service.h2
5 files changed, 61 insertions, 4 deletions
diff --git a/README b/README
index 48e1af638..76bc39003 100644
--- a/README
+++ b/README
@@ -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
55Recommended autotools for compiling the SVN version are: 57Recommended 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
362bluetooth=0 362bluetooth=0
363AC_CHECK_LIB(bluetooth, ba2str, bluetooth=1, bluetooth=0) 363AC_CHECK_LIB(bluetooth, ba2str,[AC_CHECK_HEADER([bluetooth/bluetooth.h],bluetooth=1)])
364if test "$bluetooth" = 1 364if test "$bluetooth" = 1
365then 365then
366 AM_CONDITIONAL(HAVE_LIBBLUETOOTH, true) 366 AM_CONDITIONAL(HAVE_LIBBLUETOOTH, true)
@@ -373,6 +373,34 @@ then
373 bluetooth=1 373 bluetooth=1
374fi 374fi
375 375
376# check for libpulse(audio) library
377pulse=0
378AC_CHECK_LIB(pulse,pa_stream_peak,
379 [AC_CHECK_HEADER([pulse/simple.h],pulse=1)])
380if test "$pulse" = 1
381then
382 AM_CONDITIONAL(HAVE_PULSE, true)
383 AC_DEFINE([HAVE_PULSE],[1],[Have libpulse(audio) library])
384else
385 AM_CONDITIONAL(HAVE_PULSE, false)
386fi
387if test "$build_target" = "mingw"
388then
389 pulse=0
390fi
391
392# check for libopus(audio) library
393opus=0
394AC_CHECK_LIB(opus,opus_decode_float,
395 [AC_CHECK_HEADER([opus/opus.h],opus=1)])
396if test "$opus" = 1
397then
398 AM_CONDITIONAL(HAVE_OPUS, true)
399 AC_DEFINE([HAVE_OPUS],[1],[Have libopus library])
400else
401 AM_CONDITIONAL(HAVE_OPUS, false)
402fi
403
376 404
377# libcurl 405# libcurl
378LIBCURL_CHECK_CONFIG(,7.21.3,curl=1,curl=0) 406LIBCURL_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.])
1441fi 1469fi
1442 1470
1471# MHD
1443if test "x$lmhd" != "x1" 1472if test "x$lmhd" != "x1"
1444then 1473then
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.])
1446fi 1475fi
1447 1476
1477# Pulse Audio
1478if test "x$pulse" != "x1"
1479then
1480 AC_MSG_NOTICE([NOTICE: libpulse(audio) not found, conversation will not be built.])
1481fi
1482
1483# Opus
1484if test "x$opus" != "x1"
1485then
1486 AC_MSG_NOTICE([NOTICE: libopus not found, conversation will not be built.])
1487fi
1488
1448AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) 1489AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
1449 1490
1450if test "$enable_framework_build" = "yes" 1491if 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
22if HAVE_PULSE
23if HAVE_OPUS
24 EXP_DIR += conversation
25endif
26endif
27
23endif 28endif
24 29
25if HAVE_MYSQL 30if 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
32bin_PROGRAMS = gnunet-conversation 32bin_PROGRAMS = gnunet-conversation
33 33
34libexec_PROGRAMS = gnunet-service-conversation \ 34libexec_PROGRAMS = \
35 gnunet-service-conversation
36
37if HAVE_PULSE
38if HAVE_OPUS
39libexec_PROGRAMS +=
35 gnunet-helper-audio-record \ 40 gnunet-helper-audio-record \
36 gnunet-helper-audio-playback 41 gnunet-helper-audio-playback
42endif
43endif
44
45
37 46
38check_PROGRAMS = \ 47check_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