+
+
+dnl
+dnl libdvbpsi ts demux
+dnl
+AC_ARG_ENABLE(dvbpsi,
+[ --enable-dvbpsi dvbpsi ts demux module (default disabled)])
+if test "x${enable_dvbpsi}" != "xno"
+then
+ AC_ARG_WITH(dvbpsi,
+ [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
+ AC_ARG_WITH(dvbpsi,
+ [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
+ case "x${with_dvbpsi}" in
+ x|xyes)
+ if test "x${with_dvbpsi_tree}" = "x"
+ then
+ AC_CHECK_HEADERS(dvbpsi/dr.h,
+ [ PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
+ ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} -ldvbpsi" ], [],
+ [ AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
+ else
+ AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
+ real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
+ if test "x${real_dvbpsi_tree}" = "x"
+ then
+ dnl The given directory can't be found
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
+ fi
+ if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+ then
+ dnl Use a custom libdvbpsi
+ AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
+ BUILTINS="${BUILTINS} demux/mpeg/ts_dvbpsi"
+ ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+ ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
+ else
+ dnl The given libdvbpsi wasn't built
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
+ fi
+ fi
+ ;;
+ xno)
+ dnl Compile without dvbpsi
+ ;;
+ *)
+ AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
+ if test "x${with_dvbpsi}" = "x"
+ then
+ test_LDFLAGS=""
+ test_CFLAGS=""
+ else
+ test_LDFLAGS="-L${with_dvbpsi}/lib"
+ test_CFLAGS="-I${with_dvbpsi}/include"
+ fi
+ CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+ AC_CHECK_HEADER([dvbpsi/dr.h],[
+ PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
+ ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
+ ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
+ ],[
+ if test "x${enable_dvbpsi}" != "x"
+ then
+ AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
+ fi
+ ])
+ CPPFLAGS="${save_CPPFLAGS}"
+ ;;
+ esac
+fi
+
+dnl
+dnl Video4Linux plugin
+dnl
+AC_ARG_ENABLE(v4l,
+ [ --enable-v4l Video4Linux input support (default disabled)])
+if test "x${enable_v4l}" = "xyes"
+then
+ AC_CHECK_HEADERS(libv4l/v4l.h, [
+ PLUGINS="${PLUGINS} access/v4l/v4l"
+ ],[])
+fi
+