diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-02-15 17:47:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-02-15 17:47:00 +0000 |
commit | 8746c724a83c26721da58a5be316a6534f2f0b61 (patch) | |
tree | caa642e6060a7ffc2cb9a4be0c3f9ecc4f3142f0 | |
parent | c9b9ccb4b65c1337fe2d6525b407968d39c72541 (diff) | |
download | gnunet-gtk-8746c724a83c26721da58a5be316a6534f2f0b61.tar.gz gnunet-gtk-8746c724a83c26721da58a5be316a6534f2f0b61.zip |
add configure checks for conversation API and speaker library before building libgnunetconversation
-rw-r--r-- | configure.ac | 23 | ||||
-rw-r--r-- | src/conversation/Makefile.am | 2 |
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 |
410 | gnunet=0 | 410 | gnunet=0 |
411 | gnunet_conversation=0 | ||
411 | lookin=${prefix} | 412 | lookin=${prefix} |
412 | GNUNET_CFLAGS="" | 413 | GNUNET_CFLAGS="" |
413 | GNUNET_CPPFLAGS="" | 414 | GNUNET_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 | |||
467 | AC_SUBST(GNUNET_CFLAGS) | 484 | AC_SUBST(GNUNET_CFLAGS) |
468 | AC_SUBST(GNUNET_LIBS) | 485 | AC_SUBST(GNUNET_LIBS) |
469 | 486 | ||
487 | AM_CONDITIONAL(HAVE_CONVERSATION, test x$gnunet_conversation != x0) | ||
488 | |||
470 | backup_CPPFLAGS="$CPPFLAGS" | 489 | backup_CPPFLAGS="$CPPFLAGS" |
471 | CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS" | 490 | CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS" |
472 | AC_CHECK_HEADERS([gnunet/gnunet_fs_service.h gnunet/gnunet_statistics_service.h gnunet/gnunet_core_service.h], [], | 491 | AC_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]) |
562 | fi | 581 | fi |
563 | 582 | ||
583 | if test "x$gnunet_conversation" == "x0" | ||
584 | then | ||
585 | AC_MSG_ERROR([gnunet-conversation-gtk will not be built]) | ||
586 | fi | ||
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 | ||
10 | if HAVE_CONVERSATION | ||
10 | bin_PROGRAMS = gnunet-conversation-gtk | 11 | bin_PROGRAMS = gnunet-conversation-gtk |
12 | endif | ||
11 | 13 | ||
12 | gnunet_conversation_gtk_SOURCES = \ | 14 | gnunet_conversation_gtk_SOURCES = \ |
13 | gnunet-conversation-gtk.c \ | 15 | gnunet-conversation-gtk.c \ |