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 Editing Services, 0.10.0.0,
7 http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
8 gstreamer-editing-services)
12 dnl initialize automake
13 AM_INIT_AUTOMAKE([-Wno-portability])
15 dnl define PACKAGE_VERSION_* variables
18 dnl check if this is a release version
19 AS_NANO(GST_CVS="no", GST_CVS="yes")
21 dnl can autoconf find the source ?
22 AC_CONFIG_SRCDIR([src/ges-timeline.c])
24 dnl define the output header for config
25 AM_CONFIG_HEADER([config.h])
27 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
30 dnl sets host_* variables
33 dnl our libraries and install dirs use major.minor as a version
34 GST_MAJORMINOR=$GST_EDITING_SERVICES_VERSION_MAJOR.$GST_EDITING_SERVICES_VERSION_MINOR
35 dnl we override it here if we need to for the release candidate of new series
37 AC_SUBST(GST_MAJORMINOR)
39 dnl FIXME: this macro doesn't actually work;
40 dnl the generated libtool script has no support for the listed tags.
41 dnl So this needs to be fixed first if we want to use this
42 dnl AS_LIBTOOL_TAGS([CXX])
47 dnl *** required versions of GStreamer stuff ***
51 dnl *** autotools stuff ****
53 dnl allow for different autotools
54 AS_AUTOTOOLS_ALTERNATE
56 dnl Add parameters for aclocal
57 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
59 dnl *** check for arguments to configure ***
68 AG_GST_ARG_WITH_PKG_CONFIG_PATH
69 AG_GST_ARG_WITH_PACKAGE_NAME
70 AG_GST_ARG_WITH_PACKAGE_ORIGIN
72 dnl *** checks for platform ***
74 dnl * hardware/architecture *
76 dnl common/m4/gst-arch.m4
80 dnl Determine endianness
83 dnl *** checks for programs ***
88 dnl determine c++ compiler
90 dnl determine if c++ is available on this system
91 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
95 dnl check if the compiler supports '-c' and '-o' options
98 dnl check if the compiler supports do while(0) macros
99 AG_GST_CHECK_DOWHILE_MACROS
101 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
102 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
104 dnl check for documentation tools
106 AS_PATH_PYTHON([2.1])
107 AG_GST_PLUGIN_DOCS([1.3],[2.1])
109 dnl *** checks for libraries ***
111 dnl check for libm, for sin() etc.
115 dnl *** checks for header files ***
117 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
118 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
120 if test "x$HAVE_UNISTD_H" != "xyes"; then
121 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
124 dnl *** checks for types/defines ***
126 dnl *** checks for structures ***
128 dnl *** checks for compiler characteristics ***
130 dnl *** checks for library functions ***
132 dnl *** checks for headers ***
134 dnl *** checks for dependency libraries ***
137 AG_GST_GLIB_CHECK([2.6])
139 dnl checks for gstreamer
140 dnl uninstalled is selected preferentially -- see pkg-config(1)
141 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ], yes)
142 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ], yes)
143 #AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ], yes)
144 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
145 #AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ], yes)
146 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], yes)
147 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
149 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
150 AC_SUBST(GSTPB_PLUGINS_DIR)
151 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
153 dnl Check for documentation xrefs
154 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
155 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
156 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
157 AC_SUBST(GLIB_PREFIX)
159 AC_SUBST(GSTPB_PREFIX)
161 dnl set license and copyright notice
163 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
164 AC_SUBST(GST_LICENSE)
166 dnl define LIBDIR so we can inform people where we live
167 AS_AC_EXPAND(LIBDIR, $libdir)
168 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
170 dnl set location of plugin directory
173 dnl define an ERROR_CFLAGS Makefile variable
174 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
176 dnl define an ERROR_CXXFLAGS Makefile variable
177 AG_GST_SET_ERROR_CXXFLAGS($GST_CVS)
179 dnl define correct level for debugging messages
180 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
182 dnl *** finalize CFLAGS, LDFLAGS, LIBS
185 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
186 dnl GST_*: flags shared by built objects to link against GStreamer
187 dnl GST_ALL_LDFLAGS: linker flags shared by all
188 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
189 dnl GST_LT_LDFLAGS: library versioning of our libraries
190 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
192 dnl GST_OPTION_CFLAGS
193 if test "x$USE_DEBUG" = xyes; then
196 AC_SUBST(PROFILE_CFLAGS)
198 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
199 dnl Define _only_ during CVS (not pre-releases or releases)
200 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
204 AC_SUBST(DEPRECATED_CFLAGS)
206 dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
207 dnl at make time with e.g. make ERROR_CFLAGS=""
208 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
209 GST_OPTION_CXXFLAGS="\$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
210 AC_SUBST(GST_OPTION_CFLAGS)
211 AC_SUBST(GST_OPTION_CXXFLAGS)
213 dnl FIXME: do we want to rename to GST_ALL_* ?
214 dnl prefer internal headers to already installed ones
215 dnl also add builddir include for enumtypes and marshal
216 dnl add GST_OPTION_CFLAGS, but overridable
217 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)"
218 GST_CXXFLAGS="$GST_CXXFLAGS \$(GST_OPTION_CXXFLAGS)"
220 AC_SUBST(GST_CXXFLAGS)
223 dnl LDFLAGS really should only contain flags, not libs - they get added before
224 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
225 GST_ALL_LDFLAGS="-no-undefined"
226 AC_SUBST(GST_ALL_LDFLAGS)
228 SHAVE_INIT([common],[enable])
230 dnl *** output files ***
240 gst-editing-services.spec