1 dnl pkg-config-based checks for GStreamer modules and dependency modules
4 dnl AG_GST_PKG_CHECK_MODULES([PREFIX], [WHICH], [REQUIRED])
5 dnl sets HAVE_[$PREFIX], [$PREFIX]_*
6 dnl AG_GST_CHECK_MODULES([PREFIX], [MODULE], [MINVER], [NAME], [REQUIRED])
7 dnl sets HAVE_[$PREFIX], [$PREFIX]_*
10 dnl AG_GST_CHECK_GST([MAJMIN], [MINVER], [REQUIRED])
11 dnl also sets/ACSUBSTs GST_TOOLS_DIR and GST_PLUGINS_DIR
12 dnl AG_GST_CHECK_GST_BASE([MAJMIN], [MINVER], [REQUIRED])
13 dnl AG_GST_CHECK_GST_GDP([MAJMIN], [MINVER], [REQUIRED])
14 dnl AG_GST_CHECK_GST_CONTROLLER([MAJMIN], [MINVER], [REQUIRED])
15 dnl AG_GST_CHECK_GST_CHECK([MAJMIN], [MINVER], [REQUIRED])
16 dnl AG_GST_CHECK_GST_PLUGINS_BASE([MAJMIN], [MINVER], [REQUIRED])
17 dnl also sets/ACSUBSTs GSTPB_PLUGINS_DIR
19 AC_DEFUN([AG_GST_PKG_CHECK_MODULES],
22 dnl not required by default, since we use this mostly for plugin deps
23 required=ifelse([$3], , "no", [$3])
25 PKG_CHECK_MODULES([$1], $which,
32 if test "x$required" = "xyes"; then
33 AC_MSG_ERROR($[$1]_PKG_ERRORS)
35 AC_MSG_NOTICE($[$1]_PKG_ERRORS)
39 dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
40 dnl It gets done automatically in automake >= 1.7, which we now require
43 AC_DEFUN([AG_GST_CHECK_MODULES],
48 required=ifelse([$5], , "yes", [$5]) dnl required by default
50 PKG_CHECK_MODULES([$1], $module >= $minver,
57 AC_MSG_NOTICE($[$1]_PKG_ERRORS)
58 if test "x$required" = "xyes"; then
59 AC_MSG_ERROR([no $module >= $minver ($name) found])
61 AC_MSG_NOTICE([no $module >= $minver ($name) found])
65 dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
66 dnl It gets done automatically in automake >= 1.7, which we now require
69 AC_DEFUN([AG_GST_CHECK_GST],
71 AG_GST_CHECK_MODULES(GST, gstreamer-[$1], [$2], [GStreamer], [$3])
72 dnl allow setting before calling this macro to override
73 if test -z $GST_TOOLS_DIR; then
74 GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-[$1]`
75 if test -z $GST_TOOLS_DIR; then
77 [no tools dir set in GStreamer pkg-config file, core upgrade needed.])
80 AC_MSG_NOTICE([using GStreamer tools in $GST_TOOLS_DIR])
81 AC_SUBST(GST_TOOLS_DIR)
83 dnl check for where core plug-ins got installed
84 dnl this is used for unit tests
85 dnl allow setting before calling this macro to override
86 if test -z $GST_PLUGINS_DIR; then
87 GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-[$1]`
88 if test -z $GST_PLUGINS_DIR; then
90 [no pluginsdir set in GStreamer pkg-config file, core upgrade needed.])
93 AC_MSG_NOTICE([using GStreamer plug-ins in $GST_PLUGINS_DIR])
94 AC_SUBST(GST_PLUGINS_DIR)
97 AC_DEFUN([AG_GST_CHECK_GST_BASE],
99 AG_GST_CHECK_MODULES(GST_BASE, gstreamer-base-[$1], [$2],
100 [GStreamer Base Libraries], [$3])
103 AC_DEFUN([AG_GST_CHECK_GST_GDP],
105 AG_GST_CHECK_MODULES(GST_GDP, gstreamer-dataprotocol-[$1], [$2],
106 [GStreamer Data Protocol Library], [$3])
109 AC_DEFUN([AG_GST_CHECK_GST_CONTROLLER],
111 AG_GST_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-[$1], [$2],
112 [GStreamer Controller Library], [$3])
115 AC_DEFUN([AG_GST_CHECK_GST_CHECK],
117 AG_GST_CHECK_MODULES(GST_CHECK, gstreamer-check-[$1], [$2],
118 [GStreamer Check unittest Library], [$3])
121 AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_BASE],
123 AG_GST_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-[$1], [$2],
124 [GStreamer Base Plug-ins Library], [$3])
126 dnl check for where base plug-ins got installed
127 dnl this is used for unit tests
128 dnl allow setting before calling this macro to override
129 if test -z $GSTPB_PLUGINS_DIR; then
130 GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-[$1]`
131 if test -z $GSTPB_PLUGINS_DIR; then
133 [no pluginsdir set in GStreamer Base Plug-ins pkg-config file])
136 AC_MSG_NOTICE([using GStreamer Base Plug-ins in $GSTPB_PLUGINS_DIR])
137 AC_SUBST(GSTPB_PLUGINS_DIR)