diff options
author | ng0 <ng0@n0.is> | 2019-10-26 12:38:32 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-10-26 12:38:32 +0000 |
commit | b25840c3b2239ba1e1beb20adf7ada2db1227153 (patch) | |
tree | b072584c2fb5c303b6e891d009569c0163bd11f6 | |
parent | 9bd7a50d91af224ea8befaa36f7e1400601267b2 (diff) | |
download | gnunet-b25840c3b2239ba1e1beb20adf7ada2db1227153.tar.gz gnunet-b25840c3b2239ba1e1beb20adf7ada2db1227153.zip |
configure: Add --with-libopus=PREFIX
-rw-r--r-- | configure.ac | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 9580756f5..0d19ae2f3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -734,14 +734,50 @@ AS_IF([test x"$pulse" = x1], | |||
734 | # check for libopus(audio) library | 734 | # check for libopus(audio) library |
735 | opus=0 | 735 | opus=0 |
736 | libopus_msg="no" | 736 | libopus_msg="no" |
737 | CHECK_LIBHEADER(LIBOPUS, | 737 | AC_MSG_CHECKING(for libopus) |
738 | opus, | 738 | AC_ARG_WITH(libopus, |
739 | opus_decode_float, | 739 | [ --with-libopus=PREFIX (base of libopus installation)], |
740 | opus/opus.h, | 740 | [AC_MSG_RESULT([$with_libopus]) |
741 | AC_CHECK_DECL([OPUS_SET_GAIN],[opus=1],[],[[#include <opus/opus.h>]])) | 741 | AS_CASE([$with_libopus], |
742 | [no],[], | ||
743 | [yes],[ | ||
744 | CHECK_LIBHEADER(LIBOPUS, | ||
745 | opus, | ||
746 | opus_decode_float, | ||
747 | opus/opus.h, | ||
748 | AC_CHECK_DECL([OPUS_SET_GAIN], | ||
749 | [opus=1], | ||
750 | [], | ||
751 | [[ | ||
752 | #include <opus/opus.h> | ||
753 | ]])) | ||
754 | ],[ | ||
755 | LDFLAGS="-L$with_libopus/lib $LDFLAGS" | ||
756 | CPPFLAGS="-I$with_libopus/include $CPPFLAGS" | ||
757 | AC_CHECK_HEADERS(opus/opus.h, | ||
758 | AC_CHECK_LIB([opus], | ||
759 | [OPUS_SET_GAIN], | ||
760 | EXT_LIB_PATH="-L$with_libopus/lib $EXT_LIB_PATH" | ||
761 | opus=1)) | ||
762 | ]) | ||
763 | ], | ||
764 | [AC_MSG_RESULT([--with-libopus not specified]) | ||
765 | CHECK_LIBHEADER(LIBOPUS, | ||
766 | opus, | ||
767 | opus_decode_float, | ||
768 | opus/opus.h, | ||
769 | AC_CHECK_DECL([OPUS_SET_GAIN], | ||
770 | [opus=1], | ||
771 | [], | ||
772 | [[ | ||
773 | #include <opus/opus.h> | ||
774 | ]]))]) | ||
775 | AM_CONDITIONAL(HAVE_OPUS, [test "$opus" = 1]) | ||
742 | AS_IF([test "x$opus" = x1], | 776 | AS_IF([test "x$opus" = x1], |
743 | [AC_DEFINE([HAVE_OPUS],[1],[Have libopus library]) | 777 | [AC_DEFINE([HAVE_OPUS],[1],[Have libopus library]) |
744 | libopus_msg="yes"]) | 778 | libopus_msg="yes"], |
779 | [AC_DEFINE([HAVE_OPUS],[0],[Lacking libopus library]) | ||
780 | libopus_msg="no"]) | ||
745 | 781 | ||
746 | # libogg | 782 | # libogg |
747 | AC_CHECK_LIB(ogg, ogg_stream_flush_fill, | 783 | AC_CHECK_LIB(ogg, ogg_stream_flush_fill, |