3
dnl initialize autoconf
4
dnl when going to/from release please set the nano (fourth number) right !
5
dnl releases only do Wall, cvs and prerelease does Werror too
6
AC_INIT(GStreamer Python Bindings, 0.10.4,
7
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
10
dnl initialize automake
13
dnl define PACKAGE_VERSION_* variables
16
dnl check if this is a release version
17
AS_NANO(GST_CVS="no", GST_CVS="yes")
19
dnl can autoconf find the source ?
20
AC_CONFIG_SRCDIR([gst/gstmodule.c])
22
dnl define the output header for config
23
AM_CONFIG_HEADER([config.h])
25
dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
28
AC_DEFINE_UNQUOTED(PYGST_MAJOR_VERSION, $PACKAGE_VERSION_MAJOR, [PyGst major version])
29
AC_DEFINE_UNQUOTED(PYGST_MINOR_VERSION, $PACKAGE_VERSION_MINOR, [PyGst minor version])
30
AC_DEFINE_UNQUOTED(PYGST_MICRO_VERSION, $PACKAGE_VERSION_MICRO, [PyGst micro version])
31
AC_DEFINE_UNQUOTED(PYGST_NANO_VERSION, $PACKAGE_VERSION_NANO, [PyGst nano version])
33
dnl Add parameters for aclocal
34
AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4")
36
dnl required versions of other packages
37
AC_SUBST(PYGTK_REQ, 2.6.3)
38
AC_SUBST(GLIB_REQ, 2.6.0)
39
AC_SUBST(GTK_REQ, 2.6.0)
40
AC_SUBST(GST_REQ, 0.10.2)
41
AC_SUBST(GSTPB_REQ, 0.10.0.2)
48
dnl AM_PATH_PYTHON(2.2)
50
AC_MSG_CHECKING(for python >= 2.3)
53
minver = (2,3,0,'final',0)
54
if sys.version_info < minver:
58
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
64
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
66
dnl check for GStreamer
68
AC_SUBST(GST_MAJORMINOR)
69
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ)
73
dnl get the installed GStreamer core version
74
GST_MINOR_VERSION=`$PKG_CONFIG --modversion gstreamer-$GST_MAJORMINOR | cut -f 3 -d.`
75
GST_CVS_VERSION=`$PKG_CONFIG --modversion gstreamer-$GST_MAJORMINOR | cut -f 4 -d.`
77
echo "Building against GStreamer core 0.10.$GST_MINOR_VERSION , ignoring API additions if needed"
79
dnl Magic for allowing new API additions without forcing dependency on new core
80
dnl release. The lines do the magic so that new API additions are ignored at
82
dnl * Also see gst/gstversion.override.in and gst-0.10.*.override
83
dnl The following lines should be updated whenever:
84
dnl _ GST_REQ is up-ed (remove obsolete lines + gst-0.10.MINOR.ignore)
85
dnl _ new core/base is released (add lines + gst-0.10.MINOR.ignore)
87
if test "x$GST_CVS_VERSION" = "x"
89
if test $GST_MINOR_VERSION -lt "3"
91
IGNORE_GST_0_10_3="gst-0.10.3.ignore"
96
if test $GST_MINOR_VERSION -lt "4"
98
IGNORE_GST_0_10_4="gst-0.10.4.ignore"
103
if test $GST_MINOR_VERSION -lt "5"
105
IGNORE_GST_0_10_5="gst-0.10.5.ignore"
114
AC_SUBST(IGNORE_GST_0_10_3)
115
AC_SUBST(IGNORE_GST_0_10_4)
116
AC_SUBST(IGNORE_GST_0_10_5)
118
dnl check for gstreamer-base; uninstalled is selected preferentially
119
PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ,
120
HAVE_GST_BASE="yes", HAVE_GST_BASE="no")
122
if test "x$HAVE_GST_BASE" = "xno"; then
123
AC_MSG_ERROR(no GStreamer Base Libs found)
126
AC_SUBST(GST_BASE_LIBS)
127
AC_SUBST(GST_BASE_CFLAGS)
129
dnl check for gstreamer-controller
130
PKG_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-$GST_MAJORMINOR >= $GST_REQ,
131
HAVE_GST_CONTROLLER="yes", HAVE_GST_CONTROLLER="no")
133
if test "x$HAVE_GST_CONTROLLER" = "xno"; then
134
AC_MSG_ERROR(no GStreamer Controller Libs found)
137
AC_SUBST(GST_CONTROLLER_LIBS)
138
AC_SUBST(GST_CONTROLLER_CFLAGS)
140
dnl check for gstreamer-net
141
PKG_CHECK_MODULES(GST_NET, gstreamer-net-$GST_MAJORMINOR >= $GST_REQ,
142
HAVE_GST_NET="yes", HAVE_GST_NET="no")
144
if test "x$HAVE_GST_NET" = "xno"; then
145
AC_MSG_ERROR(no GStreamer Networking Libs found)
148
AC_SUBST(GST_NET_LIBS)
149
AC_SUBST(GST_NET_CFLAGS)
151
dnl check for gstreamer-dataprotocol
152
PKG_CHECK_MODULES(GST_DP, gstreamer-dataprotocol-$GST_MAJORMINOR >= $GST_REQ,
153
HAVE_GST_DP="yes", HAVE_GST_DP="no")
155
if test "x$HAVE_GST_DP" = "xno"; then
156
AC_MSG_ERROR(no GStreamer Data Protocol Libs found)
159
AC_SUBST(GST_DP_LIBS)
160
AC_SUBST(GST_DP_CFLAGS)
163
dnl check for gst-plugins-base
164
PKG_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPB_REQ,
165
HAVE_GST_PLUGINS_BASE="yes", HAVE_GST_PLUGINS_BASE="no")
167
if test "x$HAVE_GST_PLUGINS_BASE" = "xno"; then
168
AC_MSG_ERROR(no gst-plugins-base found)
171
AC_SUBST(GST_PLUGINS_BASE_LIBS)
172
AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
176
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ)
177
AC_SUBST(PYGTK_CFLAGS)
179
AC_MSG_CHECKING(for pygtk defs)
180
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
181
AC_SUBST(PYGTK_DEFSDIR)
182
AC_MSG_RESULT($PYGTK_DEFSDIR)
184
AC_MSG_CHECKING(for pygtk h2def)
185
PYGTK_H2DEF=`$PKG_CONFIG --variable=codegendir pygtk-2.0`/h2def.py
186
AC_SUBST(PYGTK_H2DEF)
187
AC_MSG_RESULT($PYGTK_H2DEF)
189
AC_MSG_CHECKING(for pygtk codegen)
190
PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
191
dnl PYGTK_CODEGEN="$PYTHON \$(top_srcdir)/codegen/codegen.py"
192
AC_SUBST(PYGTK_CODEGEN)
193
AC_MSG_RESULT($PYGTK_CODEGEN)
195
dnl decide on error flags
196
dnl if we support -Wall, set it unconditionally
197
AS_COMPILER_FLAG(-Wall,
198
PYGST_ERROR_CFLAGS="-Wall",
199
PYGST_ERROR_CFLAGS="")
200
dnl if we're in nano >= 1, add -Werror if supported
201
if test "x$GST_CVS" = "xyes"
203
AS_COMPILER_FLAG(-Werror, PYGST_ERROR_CFLAGS="$PYGST_ERROR_CFLAGS -Werror")
206
PYGST_CFLAGS="$PYGST_ERROR_CFLAGS"
207
AC_SUBST(PYGST_CFLAGS)
209
dnl full installation path
210
AS_AC_EXPAND(PYTHONDIR, $pythondir)
211
AS_AC_EXPAND(PYEXECDIR, $pyexecdir)
213
dnl add debugging options ...
215
# if test "x$GCC" = xyes; then
216
# case " $CFLAGS " in
217
# *[\ \ ]-Wall[\ \ ]*) ;;
218
# *) CFLAGS="$CFLAGS -Wall" ;;
221
# case " $CFLAGS " in
222
# *[\ \ ]-std=c9x[\ \ ]*) ;;
223
# *) CFLAGS="$CFLAGS -std=c9x" ;;
226
# changequote([,])dnl
234
gst/gstversion.override
238
pkgconfig/gst-python.pc
239
pkgconfig/gst-python-uninstalled.pc