diff options
author | wsnipex <wsnipex@a1.net> | 2014-05-03 08:25:57 +0200 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2014-05-03 08:25:57 +0200 |
commit | f2bcc06841435fe2f1130c92e49d71d1dbd25215 (patch) | |
tree | dbcfa0e242ec51c5da57c09a0a98f9f4bdbcd70a | |
parent | 60bd97bdd8d662807076e9838ad7632b8c92d4fa (diff) |
[configure] use pkg-config for rtmp detection. fixes linking with newer librtmp versions
-rw-r--r-- | configure.in | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/configure.in b/configure.in index d8d06df226..ff31138546 100644 --- a/configure.in +++ b/configure.in @@ -1528,20 +1528,24 @@ fi # libRTMP if test "$use_librtmp" != "no"; then - AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],, - [if test "$use_librtmp" = "yes"; then - AC_MSG_ERROR($librtmp_not_found) - elif test "$use_librtmp" != "no"; then - AC_MSG_NOTICE($librtmp_not_found) - use_librtmp="no" - fi - ]) - if test "$use_librtmp" != "no"; then - XB_FIND_SONAME([RTMP], [rtmp], [use_librtmp]) - fi - if test "$use_librtmp" != "no"; then - AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.]) - fi + PKG_CHECK_MODULES([LIBRTMP], [librtmp], + [INCLUDES="$INCLUDES $LIBRTMP_CFLAGS"; LIBS="$LIBS $LIBRTMP_LIBS"; + AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.])], + [AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],, + [if test "$use_librtmp" = "yes"; then + AC_MSG_ERROR($librtmp_not_found) + elif test "$use_librtmp" != "no"; then + AC_MSG_NOTICE($librtmp_not_found) + use_librtmp="no" + fi + ]) + if test "$use_librtmp" != "no"; then + XB_FIND_SONAME([RTMP], [rtmp], [use_librtmp]) + fi + if test "$use_librtmp" != "no"; then + AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.]) + fi + ]) else AC_MSG_NOTICE($librtmp_disabled) fi |