vlc | branch: master | Alexey Sokolov <[email protected]> | Sun Mar 20 
02:31:30 2011 +0600| [0e34e6e8de7ef1f804bd61a42443312249f3b066] | committer: 
Jean-Baptiste Kempf

Fix check for libsidplay2 in ./configure

Some distros separate libsidplay2 into few packages.
In that case libresid-builder can be absent even if libsidplay2 was found.
Now, if libsidplay2 was found, we check for libresid-builder explicitly.

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 configure.ac |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 07f859d..c77d88a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2222,7 +2222,27 @@ AS_IF([test "${enable_gme}" != "no"], [
 dnl
 dnl  SIDPlay plugin
 dnl
-PKG_ENABLE_MODULES_VLC([SID], [], [libsidplay2], [C64 sid demux support], 
[auto], [], [-lresid-builder])
+PKG_WITH_MODULES([SID], [libsidplay2],
+               AC_LANG_PUSH(C++)
+               oldCPPFLAGS="$CPPFLAGS"
+               CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
+               AC_CHECK_HEADER([sidplay/builders/resid.h], [
+                       VLC_ADD_PLUGIN([sid])
+                       VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
+                       VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
+               ], [
+                       AS_IF([test "x${enable_sid}" = "xyes"],
+                               [AC_MSG_ERROR(Library libresid-builder needed 
for sid was not found)],
+                               [AC_MSG_WARN(Library libresid-builder needed 
for sid was not found)]
+                               )
+               ])
+               CPPFLAGS="$oldCPPFLAGS"
+               AC_LANG_POP(C++),
+               AS_IF([test "x${enable_sid}" = "xyes"],
+                       [AC_MSG_ERROR(Library libsidplay2 needed for sid was 
not found)],
+                       [AC_MSG_WARN(Library libsidplay2 needed for sid was not 
found)]
+                       ),
+               [C64 sid demux support], [auto])
 
 
 dnl

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to