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(Gst-RTSP, 0.10.6.1,
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/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 our libraries and install dirs use major.minor as a version
32 GST_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
33 dnl we override it here if we need to for the release candidate of new series
35 AC_SUBST(GST_MAJORMINOR)
39 dnl *** required versions of GStreamer stuff ***
43 dnl *** autotools stuff ****
45 dnl allow for different autotools
46 AS_AUTOTOOLS_ALTERNATE
48 dnl Add parameters for aclocal
49 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
51 dnl *** check for arguments to configure ***
56 AG_GST_ARG_WITH_PACKAGE_NAME
57 AG_GST_ARG_WITH_PACKAGE_ORIGIN
59 dnl *** checks for platform ***
61 dnl * hardware/architecture *
63 dnl *** checks for programs ***
71 AM_CHECK_PYTHON_HEADERS([HAVE_PYTHON_HEADERS="yes"], [HAVE_PYTHON_HEADERS="no"])
73 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
74 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
76 dnl check for documentation tools
80 AC_SUBST(PYGOBJECT_REQ, 2.11.2)
82 dnl check for pygobject (optional, used in the bindings)
83 PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= $PYGOBJECT_REQ,
90 AC_SUBST(PYGOBJECT_CFLAGS)
92 dnl check for gst-python
93 PKG_CHECK_MODULES(PYGST, gst-python-0.10,
101 if test "x$HAVE_PYGST" = "xyes"; then
102 PYGST_DEFSDIR=`pkg-config gst-python-0.10 --variable=defsdir`
104 AC_SUBST(PYGST_DEFSDIR, $PYGST_DEFSDIR)
106 if test "x$HAVE_PYTHON_HEADERS" = "xyes" -a \
107 "x$HAVE_PYGOBJECT" = "xyes" -a \
108 "x$HAVE_PYGST" = "xyes"; then
109 HAVE_PYTHON_BINDINGS="yes"
111 HAVE_PYTHON_BINDINGS="no"
114 AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYTHON_BINDINGS" = "xyes"])
117 AC_ARG_ENABLE([vala],
118 AC_HELP_STRING([--enable-vala],[enable Vala bindings (default=yes)]),
119 [case "${enableval}" in
120 yes) enable_vala=yes ;;
121 no) enable_vala=no ;;
122 *) AC_MSG_ERROR(bad value ${enableval} for --enable-vala) ;;
125 [enable_vala=yes]) dnl Default value
126 AM_CONDITIONAL(WITH_VALA, [test "x$enable_vala" = "xyes"])
128 dnl *** checks for libraries ***
130 dnl *** checks for header files ***
132 dnl *** checks for types/defines ***
134 dnl *** checks for structures ***
136 dnl *** checks for compiler characteristics ***
138 dnl *** checks for library functions ***
140 dnl *** checks for dependancy libraries ***
142 dnl GLib is required (GStreamer is ok with GLib-2.8, but we want at least 2.10)
145 AG_GST_GLIB_CHECK([$GLIB_REQ])
147 dnl checks for gstreamer
148 dnl uninstalled is selected preferentially -- see pkg-config(1)
149 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ], [yes])
151 GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_MAJORMINOR`
152 if test -z $GST_TOOLS_DIR; then
153 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
155 AC_SUBST(GST_TOOLS_DIR)
157 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_MAJORMINOR --variable pluginsdir`
158 AC_SUBST(GST_PLUGINS_DIR)
159 AC_MSG_NOTICE(Using GStreamer Core Plugins in $GST_PLUGINS_DIR)
161 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ], [yes])
163 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], [yes])
164 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
165 AC_SUBST(GSTPB_PLUGINS_DIR)
166 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
168 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
170 dnl FIXME: get rid of this by making sure gstreamer-check brings it in
171 dnl check for "check", unit testing library/header
172 AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
173 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
175 dnl *** set variables based on configure arguments ***
177 dnl set license and copyright notice
179 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
180 AC_SUBST(GST_LICENSE)
182 dnl set location of plugin directory
185 dnl define an ERROR_CFLAGS Makefile variable
186 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
188 dnl define correct level for debugging messages
189 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
192 AG_GST_DEFAULT_ELEMENTS
194 dnl *** finalize CFLAGS, LDFLAGS, LIBS
197 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
198 dnl GST_*: flags shared by built objects to link against GStreamer
199 dnl GST_ALL_LDFLAGS: linker flags shared by all
200 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
201 dnl GST_LT_LDFLAGS: library versioning of our libraries
202 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
204 dnl GST_OPTION_CFLAGS
205 if test "x$USE_DEBUG" = xyes; then
208 AC_SUBST(PROFILE_CFLAGS)
210 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
211 AC_SUBST(DEPRECATED_CFLAGS)
213 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
214 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
215 AC_SUBST(GST_OPTION_CFLAGS)
217 dnl FIXME: do we want to rename to GST_ALL_* ?
218 dnl prefer internal headers to already installed ones
219 dnl add GST_OPTION_CFLAGS, but overridable
220 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)"
225 dnl vars common to for all internal objects (core libs, elements, applications)
227 dnl - src and build dirs need to be added because every piece that gets built
228 dnl will need the GStreamer source and generated headers
229 GST_ALL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir) $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
230 AC_SUBST([GST_ALL_CFLAGS])
232 dnl FIXME: check if LTLIBINTL is needed everywhere
233 dnl I presume it is given that it contains the symbols that _() stuff maps to
234 GST_ALL_LIBS="$GST_LIBS $LTLIBINTL \$(GCOV_LIBS)"
235 AC_SUBST([GST_ALL_LIBS])
237 dnl LDFLAGS really should only contain flags, not libs - they get added before
238 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
239 GST_ALL_LDFLAGS="-no-undefined"
240 AC_SUBST(GST_ALL_LDFLAGS)
243 dnl default vars for all internal objects built on libgstphonon
244 dnl includes GST_ALL_*
245 GST_OBJ_CFLAGS="\$(GST_ALL_CFLAGS)"
246 AC_SUBST([GST_OBJ_CFLAGS])
247 GST_OBJ_LIBS="\$(top_builddir)/gst-phonon/libgstphonon.la \$(GST_ALL_LIBS)"
248 AC_SUBST([GST_OBJ_LIBS])
250 dnl this really should only contain flags, not libs - they get added before
251 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
253 dnl *** output files ***
255 dnl keep this alphabetic per directory, please
263 gst/rtsp-server/Makefile
266 bindings/python/Makefile
267 bindings/python/codegen/Makefile
268 bindings/vala/Makefile
270 pkgconfig/gst-rtsp-server.pc
271 pkgconfig/gst-rtsp-server-uninstalled.pc
279 Source code location : ${srcdir}
282 Vala bindings : ${enable_vala}
283 Python bindings: : ${HAVE_PYTHON_BINDINGS}
285 Gst-rtsp-server configured. Type 'make' to build.