2 dnl initialize autoconf
3 dnl when going to/from release please set the nano (fourth number) right !
4 dnl releases only do Wall, cvs and prerelease does Werror too
5 AC_INIT(Gst-RTSP, 0.11.0.1,
6 http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
10 dnl initialize automake
11 AM_INIT_AUTOMAKE([-Wno-portability 1.10])
13 dnl define PACKAGE_VERSION_* variables
16 dnl check if this is a release version
17 AS_NANO(GST_GIT="no", GST_GIT="yes")
19 dnl can autoconf find the source ?
20 AC_CONFIG_SRCDIR([gst/rtsp-server/rtsp-server.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 dnl sets host_* variables
31 dnl use pretty build output with automake >= 1.11
32 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
33 [AM_DEFAULT_VERBOSITY=1
34 AC_SUBST(AM_DEFAULT_VERBOSITY)])
36 dnl our libraries and install dirs use major.minor as a version
37 GST_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
38 dnl we override it here if we need to for the release candidate of new series
40 AC_SUBST(GST_MAJORMINOR)
44 dnl *** required versions of GStreamer stuff ***
48 dnl *** autotools stuff ****
50 dnl allow for different autotools
51 AS_AUTOTOOLS_ALTERNATE
53 dnl Add parameters for aclocal
54 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
57 dnl the version check needs to stay here because autopoint greps for it
58 AM_GNU_GETTEXT_VERSION([0.17])
59 AM_GNU_GETTEXT([external])
60 AG_GST_GETTEXT([gstreamer-$GST_MAJORMINOR])
62 dnl *** check for arguments to configure ***
67 AG_GST_ARG_WITH_PACKAGE_NAME
68 AG_GST_ARG_WITH_PACKAGE_ORIGIN
70 dnl *** checks for platform ***
72 dnl * hardware/architecture *
74 dnl *** checks for programs ***
82 AC_MSG_CHECKING(for python >= 2.3)
85 minver = (2,3,0,'final',0)
86 if sys.version_info < minver:
90 if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
96 AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
98 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
99 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
101 dnl check for gobject-introspection
102 GOBJECT_INTROSPECTION_CHECK([0.6.3])
104 dnl check for documentation tools
108 AC_SUBST(PYGOBJECT_REQ, 2.11.2)
110 dnl check for pygobject (optional, used in the bindings)
111 PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= $PYGOBJECT_REQ,
118 AC_SUBST(PYGOBJECT_CFLAGS)
120 dnl check for gst-python
121 PKG_CHECK_MODULES(PYGST, gst-python-0.10,
129 if test "x$HAVE_PYGST" = "xyes"; then
130 PYGST_DEFSDIR=`pkg-config gst-python-0.10 --variable=defsdir`
132 AC_SUBST(PYGST_DEFSDIR, $PYGST_DEFSDIR)
134 if test "x$HAVE_PYTHON_HEADERS" = "xyes" -a \
135 "x$HAVE_PYGOBJECT" = "xyes" -a \
136 "x$HAVE_PYGST" = "xyes"; then
137 HAVE_PYTHON_BINDINGS="yes"
139 HAVE_PYTHON_BINDINGS="no"
142 AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYTHON_BINDINGS" = "xyes"])
145 AC_ARG_ENABLE([vala],
146 AC_HELP_STRING([--enable-vala],[enable Vala bindings (default=yes)]),
147 [case "${enableval}" in
148 yes) enable_vala=yes ;;
149 no) enable_vala=no ;;
150 *) AC_MSG_ERROR(bad value ${enableval} for --enable-vala) ;;
153 [enable_vala=yes]) dnl Default value
154 AM_CONDITIONAL(WITH_VALA, [test "x$enable_vala" = "xyes"])
156 dnl *** checks for libraries ***
158 dnl *** checks for header files ***
160 dnl *** checks for types/defines ***
162 dnl *** checks for structures ***
164 dnl *** checks for compiler characteristics ***
166 dnl *** checks for library functions ***
168 dnl *** checks for dependancy libraries ***
170 dnl GLib is required (GStreamer is ok with GLib-2.8, but we want at least 2.10)
173 AG_GST_GLIB_CHECK([$GLIB_REQ])
175 dnl checks for gstreamer
176 dnl uninstalled is selected preferentially -- see pkg-config(1)
177 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ], [yes])
179 GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_MAJORMINOR`
180 if test -z $GST_TOOLS_DIR; then
181 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
183 AC_SUBST(GST_TOOLS_DIR)
185 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_MAJORMINOR --variable pluginsdir`
186 AC_SUBST(GST_PLUGINS_DIR)
187 AC_MSG_NOTICE(Using GStreamer Core Plugins in $GST_PLUGINS_DIR)
189 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ], [yes])
191 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], [yes])
192 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
193 AC_SUBST(GSTPB_PLUGINS_DIR)
194 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
196 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
198 dnl FIXME: get rid of this by making sure gstreamer-check brings it in
199 dnl check for "check", unit testing library/header
200 AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
201 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
203 dnl *** set variables based on configure arguments ***
205 dnl set license and copyright notice
207 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
208 AC_SUBST(GST_LICENSE)
210 dnl set location of plugin directory
213 dnl define an ERROR_CFLAGS Makefile variable
214 AG_GST_SET_ERROR_CFLAGS($GST_GIT)
216 dnl define correct level for debugging messages
217 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
220 AG_GST_DEFAULT_ELEMENTS
222 dnl *** finalize CFLAGS, LDFLAGS, LIBS
225 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
226 dnl GST_*: flags shared by built objects to link against GStreamer
227 dnl GST_ALL_LDFLAGS: linker flags shared by all
228 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
229 dnl GST_LT_LDFLAGS: library versioning of our libraries
230 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
232 dnl GST_OPTION_CFLAGS
233 if test "x$USE_DEBUG" = xyes; then
236 AC_SUBST(PROFILE_CFLAGS)
238 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
239 AC_SUBST(DEPRECATED_CFLAGS)
241 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
242 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
243 AC_SUBST(GST_OPTION_CFLAGS)
245 dnl FIXME: do we want to rename to GST_ALL_* ?
246 dnl prefer internal headers to already installed ones
247 dnl add GST_OPTION_CFLAGS, but overridable
248 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)"
253 dnl vars common to for all internal objects (core libs, elements, applications)
255 dnl - src and build dirs need to be added because every piece that gets built
256 dnl will need the GStreamer source and generated headers
257 GST_ALL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir) $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
258 AC_SUBST([GST_ALL_CFLAGS])
260 dnl FIXME: check if LTLIBINTL is needed everywhere
261 dnl I presume it is given that it contains the symbols that _() stuff maps to
262 GST_ALL_LIBS="$GST_LIBS $LTLIBINTL \$(GCOV_LIBS)"
263 AC_SUBST([GST_ALL_LIBS])
265 dnl LDFLAGS really should only contain flags, not libs - they get added before
266 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
267 GST_ALL_LDFLAGS="-no-undefined"
268 AC_SUBST(GST_ALL_LDFLAGS)
271 dnl default vars for all internal objects built on libgstphonon
272 dnl includes GST_ALL_*
273 GST_OBJ_CFLAGS="\$(GST_ALL_CFLAGS)"
274 AC_SUBST([GST_OBJ_CFLAGS])
275 GST_OBJ_LIBS="\$(top_builddir)/gst-phonon/libgstphonon.la \$(GST_ALL_LIBS)"
276 AC_SUBST([GST_OBJ_LIBS])
278 dnl this really should only contain flags, not libs - they get added before
279 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
281 dnl *** output files ***
283 dnl keep this alphabetic per directory, please
291 gst/rtsp-server/Makefile
294 bindings/python/Makefile
295 bindings/python/codegen/Makefile
296 bindings/vala/Makefile
298 pkgconfig/gst-rtsp-server.pc
299 pkgconfig/gst-rtsp-server-uninstalled.pc
301 docs/version.entities
310 Source code location : ${srcdir}
313 Vala bindings : ${enable_vala}
314 Python bindings: : ${HAVE_PYTHON_BINDINGS}
316 Gst-rtsp-server configured. Type 'make' to build.