configure.ac: Use libsrtp.pc if present
authorEdward Hervey <bilboed@bilboed.com>
Fri, 24 Oct 2014 13:53:59 +0000 (15:53 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 24 Oct 2014 14:19:58 +0000 (16:19 +0200)
configure.ac

index f78971f..e17e794 100644 (file)
@@ -2232,10 +2232,11 @@ AC_SUBST(LIBMMS_LIBS)
 dnl *** libsrtp ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_SRTP, true)
 AG_GST_CHECK_FEATURE(SRTP, [srtp library], srtp, [
-  HAVE_SRTP="yes"
-  AG_GST_CHECK_LIBHEADER(SRTP, srtp, srtp_init, , srtp/srtp.h,
-    SRTP_LIBS="-lsrtp", HAVE_SRTP="no")
+  PKG_CHECK_MODULES(SRTP, libsrtp, HAVE_SRTP="yes", 
+    AG_GST_CHECK_LIBHEADER(SRTP, srtp, srtp_init, , srtp/srtp.h, SRTP_LIBS="-lsrtp")
+  )
   AC_SUBST(SRTP_LIBS)
+  AC_SUBST(SRTP_CFLAGS)
 ])
 
 dnl *** linsys ***