aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-02-15 17:47:00 +0000
committerChristian Grothoff <christian@grothoff.org>2014-02-15 17:47:00 +0000
commit8746c724a83c26721da58a5be316a6534f2f0b61 (patch)
treecaa642e6060a7ffc2cb9a4be0c3f9ecc4f3142f0
parentc9b9ccb4b65c1337fe2d6525b407968d39c72541 (diff)
downloadgnunet-gtk-8746c724a83c26721da58a5be316a6534f2f0b61.tar.gz
gnunet-gtk-8746c724a83c26721da58a5be316a6534f2f0b61.zip
add configure checks for conversation API and speaker library before building libgnunetconversation
-rw-r--r--configure.ac23
-rw-r--r--src/conversation/Makefile.am2
2 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2bf8ac3e..60867c5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -408,6 +408,7 @@ AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging i
408 408
409# test for GNUnet core 409# test for GNUnet core
410gnunet=0 410gnunet=0
411gnunet_conversation=0
411lookin=${prefix} 412lookin=${prefix}
412GNUNET_CFLAGS="" 413GNUNET_CFLAGS=""
413GNUNET_CPPFLAGS="" 414GNUNET_CPPFLAGS=""
@@ -431,6 +432,14 @@ AC_ARG_WITH(gnunet,
431 [ 432 [
432 AC_MSG_RESULT([--with-gnunet not specified]) 433 AC_MSG_RESULT([--with-gnunet not specified])
433 PKG_CHECK_MODULES([GNUNET], [gnunetutil >= 0.9.0], gnunet=1) 434 PKG_CHECK_MODULES([GNUNET], [gnunetutil >= 0.9.0], gnunet=1)
435 AC_CHECK_HEADERS([gnunet/gnunet_conversation_service.h],
436 AC_CHECK_LIB([gnunetspeaker], [GNUNET_SPEAKER_destroy],
437 [
438 gnunet_conversation=1
439 EXT_LIB_PATH="-L${lookin}/lib $EXT_LIB_PATH"
440 ]
441 ),,[#include <gnunet/platform.h>]
442 )
434 ] 443 ]
435) 444)
436 445
@@ -454,6 +463,14 @@ then
454 ] 463 ]
455 ),,[#include <gnunet/platform.h>] 464 ),,[#include <gnunet/platform.h>]
456 ) 465 )
466 AC_CHECK_HEADERS([gnunet/gnunet_conversation_service.h],
467 AC_CHECK_LIB([gnunetspeaker], [GNUNET_SPEAKER_destroy],
468 [
469 gnunet_conversation=1
470 EXT_LIB_PATH="-L${lookin}/lib $EXT_LIB_PATH"
471 ]
472 ),,[#include <gnunet/platform.h>]
473 )
457 LIBS="$backup_LIBS" 474 LIBS="$backup_LIBS"
458 CFLAGS="$backup_CFLAGS" 475 CFLAGS="$backup_CFLAGS"
459 CPPFLAGS="$backup_CPPFLAGS" 476 CPPFLAGS="$backup_CPPFLAGS"
@@ -467,6 +484,8 @@ fi
467AC_SUBST(GNUNET_CFLAGS) 484AC_SUBST(GNUNET_CFLAGS)
468AC_SUBST(GNUNET_LIBS) 485AC_SUBST(GNUNET_LIBS)
469 486
487AM_CONDITIONAL(HAVE_CONVERSATION, test x$gnunet_conversation != x0)
488
470backup_CPPFLAGS="$CPPFLAGS" 489backup_CPPFLAGS="$CPPFLAGS"
471CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS" 490CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS"
472AC_CHECK_HEADERS([gnunet/gnunet_fs_service.h gnunet/gnunet_statistics_service.h gnunet/gnunet_core_service.h], [], 491AC_CHECK_HEADERS([gnunet/gnunet_fs_service.h gnunet/gnunet_statistics_service.h gnunet/gnunet_core_service.h], [],
@@ -561,3 +580,7 @@ then
561 AC_MSG_WARN([gnunet-setup will not include QR support]) 580 AC_MSG_WARN([gnunet-setup will not include QR support])
562fi 581fi
563 582
583if test "x$gnunet_conversation" == "x0"
584then
585 AC_MSG_ERROR([gnunet-conversation-gtk will not be built])
586fi
diff --git a/src/conversation/Makefile.am b/src/conversation/Makefile.am
index fc2cb64c..1deb0350 100644
--- a/src/conversation/Makefile.am
+++ b/src/conversation/Makefile.am
@@ -7,7 +7,9 @@ INCLUDES = \
7 @GNUNET_CFLAGS@ \ 7 @GNUNET_CFLAGS@ \
8 @GLADE_CFLAGS@ 8 @GLADE_CFLAGS@
9 9
10if HAVE_CONVERSATION
10bin_PROGRAMS = gnunet-conversation-gtk 11bin_PROGRAMS = gnunet-conversation-gtk
12endif
11 13
12gnunet_conversation_gtk_SOURCES = \ 14gnunet_conversation_gtk_SOURCES = \
13 gnunet-conversation-gtk.c \ 15 gnunet-conversation-gtk.c \