[vlc-devel] commit: Simplify Jack and DCA detection (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Aug 6 00:18:33 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug  6 00:08:08 2009 +0200| [7c8d655cf36724558b31ab9296882df9f9582129] | committer: Jean-Baptiste Kempf 

Simplify Jack and DCA detection

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c8d655cf36724558b31ab9296882df9f9582129
---

 configure.ac   |   57 ++-----------------------------------------------------
 m4/with_pkg.m4 |    2 +-
 2 files changed, 4 insertions(+), 55 deletions(-)

diff --git a/configure.ac b/configure.ac
index d4da3ca..9607681 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3159,50 +3159,7 @@ dnl
 AS_IF([test "x${enable_dts}" != "x"], [
   AC_MSG_ERROR([--enable-dts is obsolete. Please use libdca and --enable-dca.])
 ])
-AS_IF([test "x${with_dts_tree}" != "x"], [
-  AC_MSG_ERROR([--with-dts-tree is obsolete. Please use libdca and --with-dca-tree.])
-])
-
-AC_ARG_ENABLE(dca,
-  AS_HELP_STRING([--enable-dca],[DTS Coherent Acoustics support with libdca
-		  (default enabled)]))
-AS_IF([test "${enable_dca}" != "no"], [
-  AC_ARG_WITH(dca-tree,
-    [    --with-dca-tree=PATH  libdca tree for static linking],,
-    [with_dca_tree="no"])
-  AS_IF([test "${with_dca_tree}" != "no"], [
-    real_dca_tree="`cd ${with_dca_tree} 2>/dev/null && pwd`"
-    AS_IF([test -z "${real_dca_tree}"], [
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([${with_dca_tree} directory doesn't exist])
-    ])
-    dnl  Use a custom libdca
-    AC_MSG_CHECKING(for libdca in ${real_dca_tree})
-    AS_IF([test -f "${real_dca_tree}/libdca/.libs/libdca.a"], [
-      AC_MSG_RESULT(yes)
-      VLC_ADD_LIBS([dtstofloat32],[${real_dca_tree}/libdca/.libs/libdca.a])
-      AS_IF([test -f "${real_dca_tree}/include/dca.h"], [
-        VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/include])
-      ], [
-        VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/../include])
-      ])
-    ], [
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([the specified tree doesn't have libdca/.libs/libdca.a])
-    ])
-  ], [
-    PKG_CHECK_MODULES([DCA], [libdca >= 0.0.5], [
-      VLC_ADD_PLUGIN([dtstofloat32])
-      VLC_ADD_CPPFLAGS([dtstofloat32], [${DCA_CFLAGS}])
-      VLC_ADD_LIBS([dtstofloat32], [${DCA_LIBS}])
-    ], [
-      AS_IF([test "x${enable_dca}" != "x"], [
-        AC_MSG_ERROR([${DCA_PKG_ERRORS}])
-      ])
-    ])
-  ])
-])
+PKG_ENABLE_MODULES_VLC([DCA], [dtstofloat32], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
 
 dnl
 dnl  Flac plugin
@@ -4314,17 +4271,9 @@ fi
 dnl
 dnl  JACK modules
 dnl
-AC_ARG_ENABLE(jack,
- [  --enable-jack           JACK audio I/O modules (default disabled)],,
- [enable_jack="no"])
+PKG_ENABLE_MODULES_VLC([JACK], [jack], [jack], [JACK audio I/O modules],[auto])
+PKG_ENABLE_MODULES_VLC([JACK], [access_jack], [jack], [JACK audio I/O modules],[auto])
 
-AS_IF([test "${enable_jack}" != "no"], [
-  AC_CHECK_HEADERS(jack/jack.h, [
-    VLC_ADD_PLUGIN([access_jack])
-    VLC_ADD_PLUGIN([jack])
-    VLC_ADD_LIBS([access_jack jack],[-ljack])
-  ],[AC_MSG_ERROR([cannot find JACK headers])])
-])
 
 dnl
 dnl  CyberLink for C++ UPnP stack
diff --git a/m4/with_pkg.m4 b/m4/with_pkg.m4
index cd36209..705cf0c 100644
--- a/m4/with_pkg.m4
+++ b/m4/with_pkg.m4
@@ -82,7 +82,7 @@ dnl                         [DESCRIPTION], [DEFAULT],
 dnl                         [EXTRA_CFLAGS], [EXTRA_LIBS])
 AC_DEFUN([PKG_ENABLE_MODULES_VLC],
 [
-m4_pushdef([module_name], m4_default(m4_tolower([$2]),m4_tolower([$1])))
+m4_pushdef([module_name], AS_TR_SH(m4_default(m4_tolower([$2]),m4_tolower([$1]))))
 m4_pushdef([enable_arg], m4_tolower([$1]))
 
 PKG_WITH_MODULES([$1],[$3],




More information about the vlc-devel mailing list