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 have_gst_cdiocddasrc="no"
38 PKG_CHECK_MODULES([GSTREAMER],
39 [gstreamer-$GST_MAJORMINOR >= $GST_REQS gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS evas >= 0.9.9],
42 requirement="gstreamer-$GST_MAJORMINOR gstreamer-plugins-base-$GST_MAJORMINOR"
46 if test "x${have_dep}" = "xyes" ; then
48 AM_GST_ELEMENT_CHECK([ffmpeg], [have_gst_ffmpeg="yes"], [have_gst_ffmpeg="no"])
50 AM_GST_ELEMENT_CHECK([cdiocddasrc], [have_gst_cdiocddasrc="yes"], [have_gst_cdiocddasrc="no"])
52 if test "x${have_gst_ffmpeg}" = "xno" ; then
53 AC_MSG_WARN([You should install gst-ffmpeg to decode most of the video and uadio file formats])
56 if test "x${have_gst_cdiocddasrc}" = "xno" ; then
57 AC_MSG_WARN([You should install gst-cdiocddasrc to decode CD Audio])
61 if test "x$1" = "xstatic" ; then
62 requirement_emotion="${requirement} ${requirement_emotion}"
65 AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
69 dnl use: EMOTION_CHECK_DEP_VLC(want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
71 AC_DEFUN([EMOTION_CHECK_DEP_VLC],
76 PKG_CHECK_MODULES([VLC],
77 [libvlc >= 0.9 evas >= 0.9.9],
84 if test "x$1" = "xstatic" ; then
85 requirement_emotion="${requirement} ${requirement_emotion}"
88 AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
92 dnl use: EMOTION_CHECK_MODULE(description, want_module[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
93 AC_DEFUN([EMOTION_CHECK_MODULE],
95 m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
96 m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
100 AC_ARG_ENABLE([DOWN],
101 [AC_HELP_STRING([--enable-]DOWN, [enable build of $1 module @<:@default=yes@:>@])],
103 if test "x${enableval}" = "xyes" ; then
106 if test "x${enableval}" = "xstatic" ; then
107 enable_module="static"
113 [enable_module="yes"])
115 if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
120 if test "x${want_module}" = "xyes" && (test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic") ; then
121 m4_default([EMOTION_CHECK_DEP_]m4_defn([UP]))(${enable_module}, [have_module="yes"], [have_module="no"])
124 AC_MSG_CHECKING([whether to enable $1 module built])
125 AC_MSG_RESULT([${have_module}])
128 if test "x${have_module}" = "xyes" && test "x${enable_module}" = "xstatic" ; then
132 AM_CONDITIONAL(EMOTION_BUILD_[]UP, [test "x${have_module}" = "xyes"])
133 AM_CONDITIONAL(EMOTION_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
135 if test "x${static_module}" = "xyes" ; then
136 AC_DEFINE(EMOTION_STATIC_BUILD_[]UP, 1, [Set to 1 if $1 is statically built])
137 have_static_module="yes"
141 if test "x${have_module}" = "xyes" ; then
142 enable_[]DOWN=${enable_module}
145 AS_IF([test "x$have_module" = "xyes"], [$3], [$4])