-fix crash observed on FreeBSD
[oweals/gnunet.git] / src / conversation / Makefile.am
index da5702653adf09871cfd35390ac0cd4f19fb631c..d5219cae9f57ed7cb4fe6064d15067a0d7f9bcda 100644 (file)
@@ -2,6 +2,10 @@ SUBDIRS = .
 
 plugindir = $(libdir)/gnunet
 
+if MINGW
+  WINFLAGS = -no-undefined -Wl,--export-all-symbols
+endif
+
 AM_CPPFLAGS = \
   $(GNUNET_CPPFLAGS) \
   -I$(top_srcdir)/src/include \
@@ -48,7 +52,8 @@ libgnunetspeaker_la_LDFLAGS = \
 
 libgnunetconversation_la_SOURCES = \
   conversation_api.c \
-  conversation_api_call.c
+  conversation_api_call.c \
+  conversation.h
 libgnunetconversation_la_LIBADD = \
   $(top_builddir)/src/gns/libgnunetgns.la \
   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
@@ -68,31 +73,36 @@ bin_PROGRAMS = \
 libexec_PROGRAMS = \
   gnunet-service-conversation
 
-if HAVE_PULSE
-if HAVE_OPUS
-libexec_PROGRAMS += \
-  gnunet-helper-audio-record \
-  gnunet-helper-audio-playback
-endif
-endif
-
-
 check_PROGRAMS = \
  test_conversation_api \
  test_conversation_api_reject \
  test_conversation_api_twocalls
 
-if HAVE_PULSE
-if HAVE_OPUS
-TESTS = $(check_PROGRAMS)
+if BUILD_PULSE_HELPERS
+AUDIO_HELPER_RECD=gnunet-helper-audio-record
+AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
+AUDIO_TESTS=$(check_PROGRAMS)
+else
+if BUILD_GST_HELPERS
+AUDIO_HELPER_RECD=gnunet-helper-audio-record
+AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
+AUDIO_TESTS=$(check_PROGRAMS)
 endif
 endif
 
+libexec_PROGRAMS += \
+  $(AUDIO_HELPER_RECD) \
+  $(AUDIO_HELPER_PLAY)
+
+AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
+TESTS = $(AUDIO_TESTS)
+
+if BUILD_PULSE_HELPERS
 gnunet_helper_audio_record_SOURCES = \
   gnunet-helper-audio-record.c
 gnunet_helper_audio_record_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
-  -lpulse  -lopus\
+  -lpulse  -lopus -logg \
   $(INTLLIBS)
 gnunet_helper_audio_record_LDFLAGS = \
   $(GNUNET_LDFLAGS)  $(WINFLAGS)
@@ -101,10 +111,35 @@ gnunet_helper_audio_playback_SOURCES = \
   gnunet-helper-audio-playback.c
 gnunet_helper_audio_playback_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
-  -lpulse -lopus\
+  -lpulse -lopus -logg \
   $(INTLLIBS)
 gnunet_helper_audio_playback_LDFLAGS = \
   $(GNUNET_LDFLAGS)  $(WINFLAGS)
+else
+if BUILD_GST_HELPERS
+gnunet_helper_audio_record_SOURCES = \
+  gnunet-helper-audio-record-gst.c
+gnunet_helper_audio_record_LDADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(GST_LIBS) \
+  $(INTLLIBS)
+gnunet_helper_audio_record_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) $(GST_LDFLAGS)
+gnunet_helper_audio_record_CFLAGS = \
+ $(GST_CFLAGS)
+
+gnunet_helper_audio_playback_SOURCES = \
+  gnunet-helper-audio-playback-gst.c
+gnunet_helper_audio_playback_LDADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(GST_LIBS) \
+  $(INTLLIBS)
+gnunet_helper_audio_playback_LDFLAGS = \
+  $(GNUNET_LDFLAGS)  $(WINFLAGS) $(GST_LDFLAGS)
+gnunet_helper_audio_playback_CFLAGS = \
+ $(GST_CFLAGS)
+endif
+endif
 
 gnunet_service_conversation_SOURCES = \
   gnunet-service-conversation.c
@@ -112,7 +147,7 @@ gnunet_service_conversation_LDADD = \
   libgnunetconversation.la \
   libgnunetspeaker.la \
   libgnunetmicrophone.la \
-  $(top_builddir)/src/mesh/libgnunetmesh.la \
+  $(top_builddir)/src/cadet/libgnunetcadet.la \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(INTLLIBS)
 gnunet_service_conversation_LDFLAGS = \