3 dnl the fourth (nano) number should be 0 for a release, 1 for trunk,
4 dnl and 2... for a prerelease
5 dnl releases only do Wall, cvs and prerelease does Werror too
6 AS_VERSION(gst-davinci, GST_PLUGIN_VERSION, 0, 9, 7, 0,
7 GST_PLUGIN_TRUNK="no", GST_PLUGIN_TRUNK="yes")
9 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
12 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
14 AM_CONFIG_HEADER(config.h)
16 dnl make aclocal work in maintainer mode
17 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
23 dnl decide on error flags
24 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
26 if test "x$GST_WALL" = "xyes"; then
27 GST_ERROR="$GST_ERROR -Wall"
29 if test "x$GST_PLUGIN_TRUNK" = "xyes"; then
30 AS_COMPILER_FLAG(-Werror,
31 GST_ERROR="$GST_ERROR -Werror",
32 GST_ERROR="$GST_ERROR")
36 dnl Check for pkgconfig first
37 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
39 dnl Give error and exit if we don't have pkgconfig
40 if test "x$HAVE_PKGCONFIG" = "xno"; then
41 AC_MSG_ERROR(you need to have pkgconfig installed !)
44 dnl Now we're ready to ask for gstreamer libs and cflags
45 dnl And we can also ask for the right version of gstreamer
50 PKG_CHECK_MODULES(GST, \
51 gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
52 HAVE_GST=yes,HAVE_GST=no)
54 dnl Give error and exit if we don't have gstreamer
55 if test "x$HAVE_GST" = "xno"; then
56 AC_MSG_ERROR(you need gstreamer development packages installed !)
59 PKG_CHECK_MODULES(GST_BASE, \
60 gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
61 HAVE_GST_BASE=yes,HAVE_GST_BASE=no)
63 dnl Give error and exit if we don't have gstreamer
64 if test "x$HAVE_GST_BASE" = "xno"; then
65 AC_MSG_ERROR(you need gstreamer base development packages installed !)
68 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
70 dnl make GST_CFLAGS and GST_LIBS available
73 AC_SUBST(GST_BASE_LIBS)
74 AC_SUBST(GST_LIB_LDFLAGS)
75 AC_SUBST(GST_ALL_LDFLAGS)
76 AC_SUBST(GST_LT_LDFLAGS)
78 dnl make GST_MAJORMINOR available in Makefile.am
79 AC_SUBST(GST_MAJORMINOR)
81 dnl set the plugindir where plugins should be installed
82 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
85 dnl set proper LDFLAGS for plugins
86 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
87 AC_SUBST(GST_PLUGIN_LDFLAGS)