1
dnl pkg-config-based checks for GStreamer modules and dependency modules
4
dnl GST_PKG_CHECK_MODULES([PREFIX], [WHICH], [REQUIRED])
5
dnl sets HAVE_[$PREFIX], [$PREFIX]_*
6
dnl GST_CHECK_MODULES([PREFIX], [MODULE], [MINVER], [NAME], [REQUIRED])
7
dnl sets HAVE_[$PREFIX], [$PREFIX]_*
10
dnl GST_CHECK_GST([MAJMIN], [MINVER], [REQUIRED])
11
dnl also sets/ACSUBSTs GST_TOOLS_DIR and GST_PLUGINS_DIR
12
dnl GST_CHECK_GST_BASE([MAJMIN], [MINVER], [REQUIRED])
13
dnl GST_CHECK_GST_GDP([MAJMIN], [MINVER], [REQUIRED])
14
dnl GST_CHECK_GST_CONTROLLER([MAJMIN], [MINVER], [REQUIRED])
15
dnl GST_CHECK_GST_CHECK([MAJMIN], [MINVER], [REQUIRED])
16
dnl GST_CHECK_GST_PLUGINS_BASE([MAJMIN], [MINVER], [REQUIRED])
17
dnl also sets/ACSUBSTs GSTPB_PLUGINS_DIR
19
AC_DEFUN([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([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([GST_CHECK_GST],
71
GST_CHECK_MODULES(GST, gstreamer-[$1], [$2], [GStreamer], [$3])
72
GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-[$1]`
73
if test -z $GST_TOOLS_DIR; then
75
[no tools dir set in GStreamer pkg-config file; core upgrade needed.])
77
AC_SUBST(GST_TOOLS_DIR)
79
dnl check for where core plug-ins got installed
80
dnl this is used for unit tests
81
GST_PLUGINS_DIR=`pkg-config --variable=pluginsdir gstreamer-[$1]`
82
if test -z $GST_PLUGINS_DIR; then
84
[no pluginsdir set in GStreamer pkg-config file; core upgrade needed.])
86
AC_SUBST(GST_PLUGINS_DIR)
89
AC_DEFUN([GST_CHECK_GST_BASE],
91
GST_CHECK_MODULES(GST_BASE, gstreamer-base-[$1], [$2],
92
[GStreamer Base Libraries], [$3])
95
AC_DEFUN([GST_CHECK_GST_GDP],
97
GST_CHECK_MODULES(GST_GDP, gstreamer-dataprotocol-[$1], [$2],
98
[GStreamer Data Protocol Library], [$3])
101
AC_DEFUN([GST_CHECK_GST_CONTROLLER],
103
GST_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-[$1], [$2],
104
[GStreamer Controller Library], [$3])
107
AC_DEFUN([GST_CHECK_GST_CHECK],
109
GST_CHECK_MODULES(GST_CHECK, gstreamer-check-[$1], [$2],
110
[GStreamer Check unittest Library], [$3])
113
AC_DEFUN([GST_CHECK_GST_PLUGINS_BASE],
115
GST_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-[$1], [$2],
116
[GStreamer Base Plug-ins Library], [$3])
118
dnl check for where base plug-ins got installed
119
dnl this is used for unit tests
120
GSTPB_PLUGINS_DIR=`pkg-config --variable=pluginsdir gstreamer-plugins-base-[$1]`
121
if test -z $GSTPB_PLUGINS_DIR; then
123
[no pluginsdir set in GStreamer Base Plug-ins pkg-config file])
125
AC_SUBST(GSTPB_PLUGINS_DIR)