diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac index 753c77924..18f38155a 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -37,7 +37,7 @@ AC_CANONICAL_TARGET | |||
37 | AC_CANONICAL_HOST | 37 | AC_CANONICAL_HOST |
38 | AC_CANONICAL_SYSTEM | 38 | AC_CANONICAL_SYSTEM |
39 | AM_INIT_AUTOMAKE | 39 | AM_INIT_AUTOMAKE |
40 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | 40 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AM_DEFAULT_VERBOSITY=1 AC_SUBST(AM_DEFAULT_VERBOSITY)]) |
41 | AC_CONFIG_HEADERS([gnunet_config.h]) | 41 | AC_CONFIG_HEADERS([gnunet_config.h]) |
42 | AH_TOP([#define _GNU_SOURCE 1]) | 42 | AH_TOP([#define _GNU_SOURCE 1]) |
43 | AC_CONFIG_MACRO_DIR([m4]) | 43 | AC_CONFIG_MACRO_DIR([m4]) |
@@ -53,6 +53,9 @@ AM_PROG_CC_C_O | |||
53 | LT_INIT([disable-static dlopen win32-dll]) | 53 | LT_INIT([disable-static dlopen win32-dll]) |
54 | AC_SUBST(MKDIR_P) | 54 | AC_SUBST(MKDIR_P) |
55 | 55 | ||
56 | # allow for different autotools | ||
57 | AS_AUTOTOOLS_ALTERNATE | ||
58 | |||
56 | # large file support | 59 | # large file support |
57 | AC_SYS_LARGEFILE | 60 | AC_SYS_LARGEFILE |
58 | AC_FUNC_FSEEKO | 61 | AC_FUNC_FSEEKO |
@@ -576,7 +579,7 @@ AC_LANG_POP(C) | |||
576 | 579 | ||
577 | # check for bluetooth library | 580 | # check for bluetooth library |
578 | bluetooth=0 | 581 | bluetooth=0 |
579 | AC_CHECK_LIB(bluetooth, ba2str,[AC_CHECK_HEADER([bluetooth/bluetooth.h],bluetooth=1)]) | 582 | CHECK_LIBHEADER(BLUETOOTH, bluetooth, ba2str, bluetooth/bluetooth.h,bluetooth=1,) |
580 | AS_IF([test "$build_target" = "mingw"], | 583 | AS_IF([test "$build_target" = "mingw"], |
581 | [bluetooth=1]) | 584 | [bluetooth=1]) |
582 | AM_CONDITIONAL(HAVE_LIBBLUETOOTH, [test "$bluetooth" = 1]) | 585 | AM_CONDITIONAL(HAVE_LIBBLUETOOTH, [test "$bluetooth" = 1]) |
@@ -592,11 +595,8 @@ AC_ARG_WITH(zbar, | |||
592 | [AC_MSG_RESULT([$with_zbar]) | 595 | [AC_MSG_RESULT([$with_zbar]) |
593 | AS_CASE([$with_zbar], | 596 | AS_CASE([$with_zbar], |
594 | [no],[], | 597 | [no],[], |
595 | [yes],[ | 598 | [yes],[CHECK_LIBHEADER(ZBAR, zbar, zbar_processor_create, zbar.h,zbar=1,,)], |
596 | AC_CHECK_HEADERS(zbar.h, | 599 | [ |
597 | AC_CHECK_LIB([zbar], [zbar_processor_create], | ||
598 | zbar=1)) | ||
599 | ],[ | ||
600 | LDFLAGS="-L$with_zbar/lib $LDFLAGS" | 600 | LDFLAGS="-L$with_zbar/lib $LDFLAGS" |
601 | CPPFLAGS="-I$with_zbar/include $CPPFLAGS" | 601 | CPPFLAGS="-I$with_zbar/include $CPPFLAGS" |
602 | AC_CHECK_HEADERS(zbar.h, | 602 | AC_CHECK_HEADERS(zbar.h, |
@@ -606,9 +606,7 @@ AC_ARG_WITH(zbar, | |||
606 | ]) | 606 | ]) |
607 | ], | 607 | ], |
608 | [AC_MSG_RESULT([--with-zbar not specified]) | 608 | [AC_MSG_RESULT([--with-zbar not specified]) |
609 | AC_CHECK_HEADERS(zbar.h, | 609 | CHECK_LIBHEADER(ZBAR, zbar, zbar_processor_create, zbar.h,zbar=1,,)]) |
610 | AC_CHECK_LIB([zbar], [zbar_processor_create], | ||
611 | zbar=1))]) | ||
612 | AM_CONDITIONAL(HAVE_ZBAR, [test "$zbar" = 1]) | 610 | AM_CONDITIONAL(HAVE_ZBAR, [test "$zbar" = 1]) |
613 | AS_IF([test "x$zbar" = x1], | 611 | AS_IF([test "x$zbar" = x1], |
614 | [AC_DEFINE([HAVE_ZBAR],[1],[Have zbar library])], | 612 | [AC_DEFINE([HAVE_ZBAR],[1],[Have zbar library])], |
@@ -618,14 +616,12 @@ AS_IF([test "x$zbar" = x1], | |||
618 | jansson=0 | 616 | jansson=0 |
619 | AC_MSG_CHECKING(for libjansson) | 617 | AC_MSG_CHECKING(for libjansson) |
620 | AC_ARG_WITH(jansson, | 618 | AC_ARG_WITH(jansson, |
621 | [ --with-jansson=PFX base of libjansson installation], | 619 | [--with-jansson=PREFIX (base of libjansson installation)], |
622 | [AC_MSG_RESULT([$with_jansson]) | 620 | [AC_MSG_RESULT([$with_jansson]) |
623 | AS_CASE([$with_jansson], | 621 | AS_CASE([$with_jansson], |
624 | [no],[], | 622 | [no],[], |
625 | [yes],[ | 623 | [yes],[ |
626 | AC_CHECK_HEADERS(jansson.h, | 624 | CHECK_LIBHEADER(JANSSON, jansson, json_loads, jansson.h,jansson=1,) |
627 | AC_CHECK_LIB([jansson], [json_loads], | ||
628 | jansson=1)) | ||
629 | ],[ | 625 | ],[ |
630 | LDFLAGS="-L$with_jansson/lib $LDFLAGS" | 626 | LDFLAGS="-L$with_jansson/lib $LDFLAGS" |
631 | CPPFLAGS="-I$with_jansson/include $CPPFLAGS" | 627 | CPPFLAGS="-I$with_jansson/include $CPPFLAGS" |
@@ -636,9 +632,7 @@ AC_ARG_WITH(jansson, | |||
636 | ]) | 632 | ]) |
637 | ], | 633 | ], |
638 | [AC_MSG_RESULT([--with-jansson not specified]) | 634 | [AC_MSG_RESULT([--with-jansson not specified]) |
639 | AC_CHECK_HEADERS(jansson.h, | 635 | CHECK_LIBHEADER(JANSSON, jansson, json_loads, jansson.h,jansson=1,)]) |
640 | AC_CHECK_LIB([jansson], [json_loads], | ||
641 | jansson=1))]) | ||
642 | AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) | 636 | AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) |
643 | AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) | 637 | AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) |
644 | AS_IF([test "x$jansson" = x1], | 638 | AS_IF([test "x$jansson" = x1], |
@@ -648,8 +642,7 @@ AS_IF([test "x$jansson" = x1], | |||
648 | 642 | ||
649 | # check for libpulse(audio) library | 643 | # check for libpulse(audio) library |
650 | pulse=0 | 644 | pulse=0 |
651 | AC_CHECK_LIB(pulse,pa_stream_peek, | 645 | CHECK_LIBHEADER(LIBPULSE, pulse, pa_stream_peek, pulse/simple.h,jansson=1,) |
652 | [AC_CHECK_HEADER([pulse/simple.h],pulse=1)]) | ||
653 | AS_IF([test "$build_target" = "mingw"], | 646 | AS_IF([test "$build_target" = "mingw"], |
654 | [pulse=0]) | 647 | [pulse=0]) |
655 | AS_IF([test "$pulse" = 1], | 648 | AS_IF([test "$pulse" = 1], |
@@ -657,12 +650,11 @@ AS_IF([test "$pulse" = 1], | |||
657 | 650 | ||
658 | # check for libopus(audio) library | 651 | # check for libopus(audio) library |
659 | opus=0 | 652 | opus=0 |
660 | AC_CHECK_LIB(opus,opus_decode_float, | 653 | CHECK_LIBHEADER(LIBOPUS, |
661 | [AC_CHECK_HEADER([opus/opus.h], | 654 | opus, |
662 | [AC_CHECK_DECL([OPUS_SET_GAIN],[opus=1],[],[[#include <opus/opus.h>]] | 655 | opus_decode_float, |
663 | )] | 656 | opus/opus.h, |
664 | )] | 657 | AC_CHECK_DECL([OPUS_SET_GAIN],[opus=1],[],[[#include <opus/opus.h>]])) |
665 | ) | ||
666 | AS_IF([test "x$opus" = x1], | 658 | AS_IF([test "x$opus" = x1], |
667 | [AC_DEFINE([HAVE_OPUS],[1],[Have libopus library])]) | 659 | [AC_DEFINE([HAVE_OPUS],[1],[Have libopus library])]) |
668 | 660 | ||
@@ -1992,7 +1984,7 @@ AS_IF([test "$extractor" != 1], | |||
1992 | [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])], | 1984 | [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])], |
1993 | [libextractor_msg="yes"]) | 1985 | [libextractor_msg="yes"]) |
1994 | # -- libzbar | 1986 | # -- libzbar |
1995 | AS_IF([test "$have_zbar" = 1], | 1987 | AS_IF([test "x$zbar" = "x1"], |
1996 | [libzbar_msg="yes" | 1988 | [libzbar_msg="yes" |
1997 | features_msg="$features_msg gnunet-qr"], | 1989 | features_msg="$features_msg gnunet-qr"], |
1998 | [AC_MSG_NOTICE([WARNING: zbar not found, gnunet-qr will not be built.]) | 1990 | [AC_MSG_NOTICE([WARNING: zbar not found, gnunet-qr will not be built.]) |