~ubuntu-branches/ubuntu/precise/gst0.10-python/precise

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Loic Minier
  • Date: 2006-06-25 19:37:45 UTC
  • Revision ID: james.westby@ubuntu.com-20060625193745-9yeg0wq56r24n57x
Tags: upstream-0.10.4
ImportĀ upstreamĀ versionĀ 0.10.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_PREREQ(2.52)
 
2
 
 
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,
 
8
    gst-python)
 
9
 
 
10
dnl initialize automake
 
11
AM_INIT_AUTOMAKE
 
12
 
 
13
dnl define PACKAGE_VERSION_* variables
 
14
AS_VERSION
 
15
 
 
16
dnl check if this is a release version
 
17
AS_NANO(GST_CVS="no", GST_CVS="yes")
 
18
 
 
19
dnl can autoconf find the source ?
 
20
AC_CONFIG_SRCDIR([gst/gstmodule.c])
 
21
 
 
22
dnl define the output header for config
 
23
AM_CONFIG_HEADER([config.h])
 
24
 
 
25
dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
 
26
AM_MAINTAINER_MODE
 
27
 
 
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])
 
32
 
 
33
dnl Add parameters for aclocal
 
34
AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4")
 
35
 
 
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)
 
42
 
 
43
 
 
44
AC_DISABLE_STATIC
 
45
AC_PROG_LIBTOOL
 
46
 
 
47
dnl check for python
 
48
dnl AM_PATH_PYTHON(2.2)
 
49
AM_PATH_PYTHON
 
50
AC_MSG_CHECKING(for python >= 2.3)
 
51
prog="
 
52
import sys, string
 
53
minver = (2,3,0,'final',0)
 
54
if sys.version_info < minver:
 
55
  sys.exit(1)
 
56
sys.exit(0)"
 
57
 
 
58
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
 
59
then
 
60
  AC_MSG_RESULT(okay)
 
61
else
 
62
  AC_MSG_ERROR(too old)
 
63
fi
 
64
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
 
65
 
 
66
dnl check for GStreamer
 
67
GST_MAJORMINOR=0.10
 
68
AC_SUBST(GST_MAJORMINOR)
 
69
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ)
 
70
AC_SUBST(GST_CFLAGS)
 
71
AC_SUBST(GST_LIBS)
 
72
 
 
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.`
 
76
 
 
77
echo "Building against GStreamer core 0.10.$GST_MINOR_VERSION , ignoring API additions if needed"
 
78
 
 
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
 
81
dnl compile time.
 
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)
 
86
 
 
87
if test "x$GST_CVS_VERSION" = "x"
 
88
then
 
89
  if test $GST_MINOR_VERSION -lt "3"
 
90
  then
 
91
    IGNORE_GST_0_10_3="gst-0.10.3.ignore"
 
92
  else
 
93
    IGNORE_GST_0_10_3=""
 
94
  fi
 
95
 
 
96
  if test $GST_MINOR_VERSION -lt "4"
 
97
  then
 
98
    IGNORE_GST_0_10_4="gst-0.10.4.ignore"
 
99
  else
 
100
    IGNORE_GST_0_10_4=""
 
101
  fi
 
102
  
 
103
  if test $GST_MINOR_VERSION -lt "5"
 
104
  then
 
105
    IGNORE_GST_0_10_5="gst-0.10.5.ignore"
 
106
  else
 
107
    IGNORE_GST_0_10_5=""
 
108
  fi
 
109
else
 
110
  IGNORE_GST_0_10_3=""
 
111
  IGNORE_GST_0_10_4=""
 
112
  IGNORE_GST_0_10_5=""
 
113
fi
 
114
AC_SUBST(IGNORE_GST_0_10_3)
 
115
AC_SUBST(IGNORE_GST_0_10_4)
 
116
AC_SUBST(IGNORE_GST_0_10_5)
 
117
 
 
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")
 
121
 
 
122
if test "x$HAVE_GST_BASE" = "xno"; then
 
123
  AC_MSG_ERROR(no GStreamer Base Libs found)
 
124
fi
 
125
 
 
126
AC_SUBST(GST_BASE_LIBS)
 
127
AC_SUBST(GST_BASE_CFLAGS)
 
128
 
 
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")
 
132
 
 
133
if test "x$HAVE_GST_CONTROLLER" = "xno"; then
 
134
  AC_MSG_ERROR(no GStreamer Controller Libs found)
 
135
fi
 
136
 
 
137
AC_SUBST(GST_CONTROLLER_LIBS)
 
138
AC_SUBST(GST_CONTROLLER_CFLAGS)
 
139
 
 
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")
 
143
 
 
144
if test "x$HAVE_GST_NET" = "xno"; then
 
145
  AC_MSG_ERROR(no GStreamer Networking Libs found)
 
146
fi
 
147
 
 
148
AC_SUBST(GST_NET_LIBS)
 
149
AC_SUBST(GST_NET_CFLAGS)
 
150
 
 
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")
 
154
 
 
155
if test "x$HAVE_GST_DP" = "xno"; then
 
156
  AC_MSG_ERROR(no GStreamer Data Protocol Libs found)
 
157
fi
 
158
 
 
159
AC_SUBST(GST_DP_LIBS)
 
160
AC_SUBST(GST_DP_CFLAGS)
 
161
 
 
162
 
 
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")
 
166
 
 
167
if test "x$HAVE_GST_PLUGINS_BASE" = "xno"; then
 
168
  AC_MSG_ERROR(no gst-plugins-base found)
 
169
fi
 
170
 
 
171
AC_SUBST(GST_PLUGINS_BASE_LIBS)
 
172
AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
 
173
 
 
174
 
 
175
dnl check for pygtk
 
176
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ)
 
177
AC_SUBST(PYGTK_CFLAGS)
 
178
 
 
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)
 
183
 
 
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)
 
188
 
 
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)
 
194
 
 
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"
 
202
then
 
203
  AS_COMPILER_FLAG(-Werror, PYGST_ERROR_CFLAGS="$PYGST_ERROR_CFLAGS -Werror")
 
204
fi
 
205
 
 
206
PYGST_CFLAGS="$PYGST_ERROR_CFLAGS"
 
207
AC_SUBST(PYGST_CFLAGS)
 
208
 
 
209
dnl full installation path
 
210
AS_AC_EXPAND(PYTHONDIR, $pythondir)
 
211
AS_AC_EXPAND(PYEXECDIR, $pyexecdir)
 
212
 
 
213
dnl add debugging options ...
 
214
# changequote(,)dnl
 
215
# if test "x$GCC" = xyes; then
 
216
#   case " $CFLAGS " in
 
217
#   *[\ \ ]-Wall[\      \ ]*) ;;
 
218
#   *) CFLAGS="$CFLAGS -Wall" ;;
 
219
#   esac
 
220
 
 
221
#   case " $CFLAGS " in
 
222
#   *[\ \ ]-std=c9x[\   \ ]*) ;;
 
223
#   *) CFLAGS="$CFLAGS -std=c9x" ;;
 
224
#   esac
 
225
# fi
 
226
# changequote([,])dnl
 
227
 
 
228
GST_VALGRIND_CHECK()
 
229
 
 
230
AC_OUTPUT([
 
231
  Makefile
 
232
  codegen/Makefile
 
233
  gst/Makefile
 
234
  gst/gstversion.override
 
235
  gst/extend/Makefile
 
236
  examples/Makefile
 
237
  pkgconfig/Makefile
 
238
  pkgconfig/gst-python.pc
 
239
  pkgconfig/gst-python-uninstalled.pc
 
240
  testsuite/Makefile
 
241
  gst-python.spec
 
242
])