2 dnl use: EMOTION_CHECK_DEP_XINE(want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
4 AC_DEFUN([EMOTION_CHECK_DEP_XINE],
9 PKG_CHECK_MODULES([XINE],
10 [libxine >= 1.1.1 evas >= 0.9.9],
17 if test "x$1" = "xstatic" ; then
18 requirement_emotion="${requirement} ${requirement_emotion}"
21 AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
25 dnl use: EMOTION_CHECK_DEP_GSTREAMER(want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
27 AC_DEFUN([EMOTION_CHECK_DEP_GSTREAMER],
36 PKG_CHECK_MODULES([GSTREAMER],
37 [gstreamer-$GST_MAJORMINOR >= $GST_REQS gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS evas >= 0.9.9],
40 requirement="gstreamer-$GST_MAJORMINOR gstreamer-plugins-base-$GST_MAJORMINOR"
44 if test "x${have_dep}" = "xyes" ; then
46 AM_GST_ELEMENT_CHECK([ffmpeg], [have_gst_ffmpeg="yes"], [have_gst_ffmpeg="no"])
48 AM_GST_ELEMENT_CHECK([cdiocddasrc], [have_gst_cdiocddasrc="yes"], [have_gst_cdiocddasrc="no"])
50 if test "x${have_gst_ffmpeg}" = "xno" ; then
51 AC_MSG_WARN([You should install gst-ffmpeg to decode most of the video and uadio file formats])
54 if test "x${have_gst_cdiocddasrc}" = "xno" ; then
55 AC_MSG_WARN([You should install gst-cdiocddasrc to decode CD Audio])
59 if test "x$1" = "xstatic" ; then
60 requirement_emotion="${requirement} ${requirement_emotion}"
63 AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
67 dnl use: EMOTION_CHECK_DEP_VLC(want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
69 AC_DEFUN([EMOTION_CHECK_DEP_VLC],
74 PKG_CHECK_MODULES([VLC],
75 [libvlc >= 0.9 evas >= 0.9.9],
82 if test "x$1" = "xstatic" ; then
83 requirement_emotion="${requirement} ${requirement_emotion}"
86 AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
90 dnl use: EMOTION_CHECK_MODULE(description, want_module[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
91 AC_DEFUN([EMOTION_CHECK_MODULE],
93 m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
94 m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
99 [AC_HELP_STRING([--enable-]DOWN, [enable build of $1 module @<:@default=yes@:>@])],
101 if test "x${enableval}" = "xyes" ; then
104 if test "x${enableval}" = "xstatic" ; then
105 enable_module="static"
111 [enable_module="yes"])
113 if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
118 if test "x${want_module}" = "xyes" && (test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic") ; then
119 m4_default([EMOTION_CHECK_DEP_]m4_defn([UP]))(${enable_module}, [have_module="yes"], [have_module="no"])
122 AC_MSG_CHECKING([whether to enable $1 module built])
123 AC_MSG_RESULT([${have_module}])
126 if test "x${have_module}" = "xyes" && test "x${enable_module}" = "xstatic" ; then
130 AM_CONDITIONAL(EMOTION_BUILD_[]UP, [test "x${have_module}" = "xyes"])
131 AM_CONDITIONAL(EMOTION_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
133 if test "x${static_module}" = "xyes" ; then
134 AC_DEFINE(EMOTION_STATIC_BUILD_[]UP, 1, [Set to 1 if $1 is statically built])
135 have_static_module="yes"
139 if test "x${have_module}" = "xyes" ; then
140 enable_[]DOWN=${enable_module}
143 AS_IF([test "x$have_module" = "xyes"], [$3], [$4])