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.0.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 export for .pc files
47 dnl *** autotools stuff ****
49 dnl allow for different autotools
50 AS_AUTOTOOLS_ALTERNATE
52 dnl Add parameters for aclocal
53 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
55 dnl *** check for arguments to configure ***
60 AG_GST_ARG_WITH_PACKAGE_NAME
61 AG_GST_ARG_WITH_PACKAGE_ORIGIN
63 dnl *** checks for platform ***
65 dnl * hardware/architecture *
67 dnl *** checks for programs ***
72 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
73 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
75 dnl check for documentation tools
79 AC_SUBST(PYGOBJECT_REQ, 2.11.2)
81 dnl check for pygobject (optional, used in the bindings)
82 PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= $PYGOBJECT_REQ,
89 AC_SUBST(PYGOBJECT_CFLAGS)
91 dnl check for gst-python
92 PKG_CHECK_MODULES(PYGST, gst-python-0.10,
100 if test "x$HAVE_PYGST" = "xyes"; then
101 PYGST_DEFSDIR=`pkg-config gst-python-0.10 --variable=defsdir`
103 AC_SUBST(PYGST_DEFSDIR, $PYGST_DEFSDIR)
105 if test "x$HAVE_PYTHON_HEADERS" = "xyes" -a \
106 "x$HAVE_PYGOBJECT" = "xyes" -a \
107 "x$HAVE_PYGST" = "xyes"; then
108 HAVE_PYTHON_BINDINGS="yes"
110 HAVE_PYTHON_BINDINGS="no"
112 AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYTHON_BINDINGS" = "xyes"])
115 PKG_CHECK_EXISTS([vala-1.0], [HAVE_VALA="yes"], [HAVE_VALA="no"])
117 AM_CONDITIONAL(WITH_VALA, [test "x$HAVE_VALA" = "xyes"])
119 AC_ARG_WITH([vapidir],
120 AS_HELP_STRING([--with-vapidir], [Define where to install the VAPI files]))
122 if test "x$HAVE_VALA" = "xyes"; then
123 if test "x$with_vapidir" = "x"; then
124 VAPIDIR="`pkg-config --variable vapidir vala-1.0`"
126 VAPIDIR="$with_vapidir"
132 dnl *** checks for libraries ***
134 dnl *** checks for header files ***
136 dnl *** checks for types/defines ***
138 dnl *** checks for structures ***
140 dnl *** checks for compiler characteristics ***
142 dnl *** checks for library functions ***
144 dnl *** checks for dependancy libraries ***
146 dnl GLib is required (GStreamer is ok with GLib-2.8, but we want at least 2.10)
149 AG_GST_GLIB_CHECK([$GLIB_REQ])
151 dnl checks for gstreamer
152 dnl uninstalled is selected preferentially -- see pkg-config(1)
153 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
155 GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_MAJORMINOR`
156 if test -z $GST_TOOLS_DIR; then
157 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
159 AC_SUBST(GST_TOOLS_DIR)
161 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_MAJORMINOR --variable pluginsdir`
162 AC_SUBST(GST_PLUGINS_DIR)
163 AC_MSG_NOTICE(Using GStreamer Core Plugins in $GST_PLUGINS_DIR)
165 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
167 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ])
168 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
169 AC_SUBST(GSTPB_PLUGINS_DIR)
170 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
172 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
174 dnl FIXME: get rid of this by making sure gstreamer-check brings it in
175 dnl check for "check", unit testing library/header
176 AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
177 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
179 dnl *** set variables based on configure arguments ***
181 dnl set license and copyright notice
183 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
184 AC_SUBST(GST_LICENSE)
186 dnl set location of plugin directory
189 dnl define an ERROR_CFLAGS Makefile variable
190 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
192 dnl define correct level for debugging messages
193 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
196 AG_GST_DEFAULT_ELEMENTS
198 dnl *** finalize CFLAGS, LDFLAGS, LIBS
201 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
202 dnl GST_*: flags shared by built objects to link against GStreamer
203 dnl GST_ALL_LDFLAGS: linker flags shared by all
204 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
205 dnl GST_LT_LDFLAGS: library versioning of our libraries
206 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
208 dnl GST_OPTION_CFLAGS
209 if test "x$USE_DEBUG" = xyes; then
212 AC_SUBST(PROFILE_CFLAGS)
214 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
215 AC_SUBST(DEPRECATED_CFLAGS)
217 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
218 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
219 AC_SUBST(GST_OPTION_CFLAGS)
221 dnl FIXME: do we want to rename to GST_ALL_* ?
222 dnl prefer internal headers to already installed ones
223 dnl add GST_OPTION_CFLAGS, but overridable
224 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)"
229 dnl vars common to for all internal objects (core libs, elements, applications)
231 dnl - src and build dirs need to be added because every piece that gets built
232 dnl will need the GStreamer source and generated headers
233 GST_ALL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir) $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
234 AC_SUBST([GST_ALL_CFLAGS])
236 dnl FIXME: check if LTLIBINTL is needed everywhere
237 dnl I presume it is given that it contains the symbols that _() stuff maps to
238 GST_ALL_LIBS="$GST_LIBS $LTLIBINTL \$(GCOV_LIBS)"
239 AC_SUBST([GST_ALL_LIBS])
241 dnl LDFLAGS really should only contain flags, not libs - they get added before
242 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
243 GST_ALL_LDFLAGS="-no-undefined"
244 AC_SUBST(GST_ALL_LDFLAGS)
247 dnl default vars for all internal objects built on libgstphonon
248 dnl includes GST_ALL_*
249 GST_OBJ_CFLAGS="\$(GST_ALL_CFLAGS)"
250 AC_SUBST([GST_OBJ_CFLAGS])
251 GST_OBJ_LIBS="\$(top_builddir)/gst-phonon/libgstphonon.la \$(GST_ALL_LIBS)"
252 AC_SUBST([GST_OBJ_LIBS])
254 dnl this really should only contain flags, not libs - they get added before
255 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
257 dnl *** output files ***
259 dnl keep this alphabetic per directory, please
267 gst/rtsp-server/Makefile
270 bindings/vala/Makefile
272 pkgconfig/gst-rtsp-server.pc
280 Source code location : ${srcdir}
283 Vala bindings : ${HAVE_VALA}
285 Gst-rtsp-server configured. Type 'make' to build.