Setup plugin and stub element
[gst-scaletempo-rj.git] / configure.ac
blob1ca9b9ddc6e0c7e7fce1f92669a71dabddc862a3
1 AC_INIT
3 PACKAGE="gst-scaletempo"
4 VERSION="git"
5 GST_PLUGIN_CVS="yes"
7 dnl versions of gstreamer and plugins-base
8 GST_MAJORMINOR=0.10
9 GST_REQUIRED=0.10.0
10 GSTPB_REQUIRED=0.10.0
12 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
13 AM_MAINTAINER_MODE
15 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
17 dnl make aclocal work in maintainer mode
18 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
20 AM_CONFIG_HEADER(config.h)
22 dnl check for tools
23 AC_PROG_CC
24 AC_PROG_LIBTOOL
27 dnl decide on error flags
28 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
29                                                                                 
30 if test "x$GST_WALL" = "xyes"; then
31    GST_ERROR="$GST_ERROR -Wall"
32                                                                                 
33    if test "x$GST_PLUGIN_CVS" = "xyes"; then
34      AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
35    fi
38 dnl Check for pkgconfig first
39 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
41 dnl Give error and exit if we don't have pkgconfig
42 if test "x$HAVE_PKGCONFIG" = "xno"; then
43   AC_MSG_ERROR(you need to have pkgconfig installed !)
46 dnl Now we're ready to ask for gstreamer libs and cflags
47 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 dnl append GST_ERROR cflags to GST_CFLAGS
60 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
62 dnl make GST_CFLAGS and GST_LIBS available
63 AC_SUBST(GST_CFLAGS)
64 AC_SUBST(GST_LIBS)
66 dnl make GST_MAJORMINOR available in Makefile.am
67 AC_SUBST(GST_MAJORMINOR)
69 dnl If we need them, we can also use the base class libraries
70 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
71                   HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
73 dnl Give a warning if we don't have gstreamer libs
74 dnl you can turn this into an error if you need them
75 if test "x$HAVE_GST_BASE" = "xno"; then
76   AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR))
79 dnl make _CFLAGS and _LIBS available
80 AC_SUBST(GST_BASE_CFLAGS)
81 AC_SUBST(GST_BASE_LIBS)
83 dnl If we need them, we can also use the gstreamer-plugins-base libraries
84 PKG_CHECK_MODULES(GSTPB_BASE,
85                   gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
86                   HAVE_GSTPB_BASE=yes, HAVE_GSTPB_BASE=no)
88 dnl Give a warning if we don't have gstreamer libs
89 dnl you can turn this into an error if you need them
90 if test "x$HAVE_GSTPB_BASE" = "xno"; then
91   AC_MSG_NOTICE(no GStreamer Plugins Base libraries found (gstreamer-plugins-base-$GST_MAJORMINOR))
94 dnl make _CFLAGS and _LIBS available
95 AC_SUBST(GSTPB_BASE_CFLAGS)
96 AC_SUBST(GSTPB_BASE_LIBS)
98 dnl If we need them, we can also use the gstreamer-controller libraries
99 PKG_CHECK_MODULES(GSTCTRL,
100                   gstreamer-controller-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
101                   HAVE_GSTCTRL=yes, HAVE_GSTCTRL=no)
103 dnl Give a warning if we don't have gstreamer-controller
104 dnl you can turn this into an error if you need them
105 if test "x$HAVE_GSTCTRL" = "xno"; then
106   AC_MSG_NOTICE(no GStreamer Controller libraries found (gstreamer-controller-$GST_MAJORMINOR))
109 dnl make _CFLAGS and _LIBS available
110 AC_SUBST(GSTCTRL_CFLAGS)
111 AC_SUBST(GSTCTRL_LIBS)
113 dnl set the plugindir where plugins should be installed
114 if test "x${prefix}" = "x$HOME"; then
115   plugindir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins"
116 else
117   plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
119 AC_SUBST(plugindir)
121 dnl set proper LDFLAGS for plugins
122 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
123 AC_SUBST(GST_PLUGIN_LDFLAGS)
125 AC_OUTPUT(Makefile m4/Makefile src/Makefile)