Change a way to copy data between gstreamer plugin.
[platform/adaptation/emulator/gst-plugins-emulator.git] / configure.ac
1 dnl required version of autoconf
2 AC_PREREQ([2.53])
3
4 dnl TODO: fill in your package name and package version here
5 AC_INIT([my-plugin-package],[0.10.0])
6
7 dnl required versions of gstreamer and plugins-base
8 GST_REQUIRED=0.10.16
9 GSTPB_REQUIRED=0.10.16
10
11 AC_CONFIG_SRCDIR([src/gstmaru.c])
12 AC_CONFIG_HEADERS([config.h])
13
14 dnl required version of automake
15 AM_INIT_AUTOMAKE([1.10])
16
17 dnl enable mainainer mode by default
18 AM_MAINTAINER_MODE([enable])
19
20 dnl check for tools (compiler etc.)
21 AC_PROG_CC
22
23 dnl required version of libtool
24 LT_PREREQ([2.2.6])
25 LT_INIT
26
27 dnl give error and exit if we don't have pkgconfig
28 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, [ ], [
29   AC_MSG_ERROR([You need to have pkg-config installed!])
30 ])
31
32 dnl Check for the required version of GStreamer core (and gst-plugins-base)
33 dnl This will export GST_CFLAGS and GST_LIBS variables for use in Makefile.am
34 dnl
35 dnl If you need libraries from gst-plugins-base here, also add:
36 dnl for libgstaudio-0.10: gstreamer-audio-0.10 >= $GST_REQUIRED
37 dnl for libgstvideo-0.10: gstreamer-video-0.10 >= $GST_REQUIRED
38 dnl for libgsttag-0.10: gstreamer-tag-0.10 >= $GST_REQUIRED
39 dnl for libgstpbutils-0.10: gstreamer-pbutils-0.10 >= $GST_REQUIRED
40 dnl for libgstfft-0.10: gstreamer-fft-0.10 >= $GST_REQUIRED
41 dnl for libgstinterfaces-0.10: gstreamer-interfaces-0.10 >= $GST_REQUIRED
42 dnl for libgstrtp-0.10: gstreamer-rtp-0.10 >= $GST_REQUIRED
43 dnl for libgstrtsp-0.10: gstreamer-rtsp-0.10 >= $GST_REQUIRED
44 dnl etc.
45 PKG_CHECK_MODULES(GST, [
46   gstreamer-0.10 >= $GST_REQUIRED
47   gstreamer-base-0.10 >= $GST_REQUIRED
48   gstreamer-controller-0.10 >= $GST_REQUIRED
49 ], [
50   AC_SUBST(GST_CFLAGS)
51   AC_SUBST(GST_LIBS)
52 ], [
53   AC_MSG_ERROR([
54       You need to install or upgrade the GStreamer development
55       packages on your system. On debian-based systems these are
56       libgstreamer0.10-dev and libgstreamer-plugins-base0.10-dev.
57       on RPM-based systems gstreamer0.10-devel, libgstreamer0.10-devel
58       or similar. The minimum version required is $GST_REQUIRED.
59   ])
60 ])
61
62 dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
63 AC_MSG_CHECKING([to see if compiler understands -Wall])
64 save_CFLAGS="$CFLAGS"
65 CFLAGS="$CFLAGS -Wall"
66 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
67   GST_CFLAGS="$GST_CFLAGS -Wall"
68   AC_MSG_RESULT([yes])
69 ], [
70   AC_MSG_RESULT([no])
71 ])
72
73 dnl set the plugindir where plugins should be installed (for src/Makefile.am)
74 if test "x${prefix}" = "x$HOME"; then
75   plugindir="$HOME/.gstreamer-0.10/plugins"
76 else
77   plugindir="\$(libdir)/gstreamer-0.10"
78 fi
79 AC_SUBST(plugindir)
80
81 dnl set proper LDFLAGS for plugins
82 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
83 AC_SUBST(GST_PLUGIN_LDFLAGS)
84
85 AC_CONFIG_FILES([Makefile src/Makefile])
86 AC_OUTPUT
87