initial import from CVS gstreamer/gst-template/gst-plugin
[gst-scaletempo-rj.git] / configure.ac
blobc5c68855fe62c4665bc2982174ca8e74448b860e
1 AC_INIT
3 dnl versions of gstreamer and plugins-base
4 GST_MAJORMINOR=0.10
5 GST_REQUIRED=0.10.0
6 GSTPB_REQUIRED=0.10.0
8 dnl fill in your package name and version here
9 dnl the fourth (nano) number should be 0 for a release, 1 for CVS,
10 dnl and 2... for a prerelease
12 dnl when going to/from release please set the nano correctly !
13 dnl releases only do Wall, cvs and prerelease does Werror too
14 AS_VERSION(gst-plugin, GST_PLUGIN_VERSION, 0, 10, 0, 1,
15     GST_PLUGIN_CVS="no", GST_PLUGIN_CVS="yes")
17 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
18 AM_MAINTAINER_MODE
20 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
22 dnl make aclocal work in maintainer mode
23 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
25 AM_CONFIG_HEADER(config.h)
27 dnl check for tools
28 AC_PROG_CC
29 AC_PROG_LIBTOOL
32 dnl decide on error flags
33 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
34                                                                                 
35 if test "x$GST_WALL" = "xyes"; then
36    GST_ERROR="$GST_ERROR -Wall"
37                                                                                 
38    if test "x$GST_PLUGIN_CVS" = "xyes"; then
39      AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
40    fi
43 dnl Check for pkgconfig first
44 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
46 dnl Give error and exit if we don't have pkgconfig
47 if test "x$HAVE_PKGCONFIG" = "xno"; then
48   AC_MSG_ERROR(you need to have pkgconfig installed !)
51 dnl Now we're ready to ask for gstreamer libs and cflags
52 dnl And we can also ask for the right version of gstreamer
55 PKG_CHECK_MODULES(GST, \
56   gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
57   HAVE_GST=yes,HAVE_GST=no)
59 dnl Give error and exit if we don't have gstreamer
60 if test "x$HAVE_GST" = "xno"; then
61   AC_MSG_ERROR(you need gstreamer development packages installed !)
64 dnl append GST_ERROR cflags to GST_CFLAGS
65 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
67 dnl make GST_CFLAGS and GST_LIBS available
68 AC_SUBST(GST_CFLAGS)
69 AC_SUBST(GST_LIBS)
71 dnl make GST_MAJORMINOR available in Makefile.am
72 AC_SUBST(GST_MAJORMINOR)
74 dnl If we need them, we can also use the base class libraries
75 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
76                   HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
78 dnl Give a warning if we don't have gstreamer libs
79 dnl you can turn this into an error if you need them
80 if test "x$HAVE_GST_BASE" = "xno"; then
81   AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR))
84 dnl make _CFLAGS and _LIBS available
85 AC_SUBST(GST_BASE_CFLAGS)
86 AC_SUBST(GST_BASE_LIBS)
88 dnl If we need them, we can also use the gstreamer-plugins-base libraries
89 PKG_CHECK_MODULES(GSTPB_BASE,
90                   gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
91                   HAVE_GSTPB_BASE=yes, HAVE_GSTPB_BASE=no)
93 dnl Give a warning if we don't have gstreamer libs
94 dnl you can turn this into an error if you need them
95 if test "x$HAVE_GSTPB_BASE" = "xno"; then
96   AC_MSG_NOTICE(no GStreamer Plugins Base libraries found (gstreamer-plugins-base-$GST_MAJORMINOR))
99 dnl make _CFLAGS and _LIBS available
100 AC_SUBST(GSTPB_BASE_CFLAGS)
101 AC_SUBST(GSTPB_BASE_LIBS)
103 dnl If we need them, we can also use the gstreamer-controller libraries
104 PKG_CHECK_MODULES(GSTCTRL,
105                   gstreamer-controller-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
106                   HAVE_GSTCTRL=yes, HAVE_GSTCTRL=no)
108 dnl Give a warning if we don't have gstreamer-controller
109 dnl you can turn this into an error if you need them
110 if test "x$HAVE_GSTCTRL" = "xno"; then
111   AC_MSG_NOTICE(no GStreamer Controller libraries found (gstreamer-controller-$GST_MAJORMINOR))
114 dnl make _CFLAGS and _LIBS available
115 AC_SUBST(GSTCTRL_CFLAGS)
116 AC_SUBST(GSTCTRL_LIBS)
118 dnl set the plugindir where plugins should be installed
119 if test "x${prefix}" = "x$HOME"; then
120   plugindir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins"
121 else
122   plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
124 AC_SUBST(plugindir)
126 dnl set proper LDFLAGS for plugins
127 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
128 AC_SUBST(GST_PLUGIN_LDFLAGS)
130 AC_OUTPUT(Makefile m4/Makefile src/Makefile)