[vlc-devel] [PATCH] dcp: Integrate asdcplib with .pc files

Nicolas Bertrand nicoinattendu at gmail.com
Tue Feb 4 11:52:16 CET 2014


May be better this way?

diff --git a/configure.ac b/configure.ac
index fc3429c..6e75836 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1920,19 +1920,9 @@ AM_CONDITIONAL(HAVE_AVFOUNDATION, [test 
"${have_avfoundation}" != "no"])
  dnl
  dnl  DCP plugin (using asdcplib)
  dnl
-AC_ARG_ENABLE(dcp,
-  AS_HELP_STRING([--enable-dcp],[Digital Cinema Package support using 
asdcplib (default auto)]))
  have_asdcp="no"
-AS_IF([test "x${enable_dcp}" != "no"], [
-  AC_LANG_PUSH(C++)
-  AC_CHECK_HEADERS( [[AS@&t at _DCP.h]],
-    [have_asdcp="yes"],
-    [AS_IF( [test "x${enable_dcp}" = "yes"],
-      [AC_MSG_ERROR( [ ASDCP library cannot be found (needed for dcp 
module). Either use --enable-dcp=no or install asdcp library: 
http://www.cinecert.com/asdcplib/dow
-     ])
-  AC_LANG_POP(C++)
-])
-AM_CONDITIONAL(HAVE_ASDCP, [test "${have_asdcp}" != "no"])
+PKG_WITH_MODULES([ASDCP], [asdcplib], [have_asdcp="yes"])
+AM_CONDITIONAL(HAVE_ASDCP, [test "${have_asdcp}" = "yes"])

  dnl
  dnl  Demux plugins
diff --git a/modules/access/Makefile.am b/modules/access/Makefile.am
index c655a47..4d461d3 100644
--- a/modules/access/Makefile.am
+++ b/modules/access/Makefile.am
@@ -10,9 +10,9 @@ libattachment_plugin_la_SOURCES = access/attachment.c
  access_LTLIBRARIES += libattachment_plugin.la

  libdcp_plugin_la_SOURCES = access/dcp/dcpparser.h access/dcp/dcp.cpp 
access/dcp/dcpparser.cpp
-libdcp_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
-libdcp_plugin_la_LIBADD = $(AM_LIBADD) -lasdcp
  if HAVE_ASDCP
+libdcp_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(ASDCP_CFLAGS)
+libdcp_plugin_la_LIBADD = $(AM_LIBADD) $(ASDCP_LIBS)
  access_LTLIBRARIES += libdcp_plugin.la
  endif




More information about the vlc-devel mailing list