Change audiodec rank to MARGINAL for using avdec
[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],[1.0.0])
6
7 dnl required versions of gstreamer and plugins-base
8 GST_REQUIRED=1.0.0
9 GSTPB_REQUIRED=1.0.0
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-1.0: gstreamer-audio-1.0 >= $GST_REQUIRED
37 dnl for libgstvideo-1.0: gstreamer-video-1.0 >= $GST_REQUIRED
38 dnl for libgsttag-1.0: gstreamer-tag-1.0 >= $GST_REQUIRED
39 dnl for libgstpbutils-1.0: gstreamer-pbutils-1.0 >= $GST_REQUIRED
40 dnl for libgstfft-1.0: gstreamer-fft-1.0 >= $GST_REQUIRED
41 dnl for libgstinterfaces-1.0: gstreamer-interfaces-1.0 >= $GST_REQUIRED
42 dnl for libgstrtp-1.0: gstreamer-rtp-1.0 >= $GST_REQUIRED
43 dnl for libgstrtsp-1.0: gstreamer-rtsp-1.0 >= $GST_REQUIRED
44 dnl etc.
45 PKG_CHECK_MODULES(GST, [
46   gstreamer-1.0 >= $GST_REQUIRED
47   gstreamer-base-1.0 >= $GST_REQUIRED
48   gstreamer-controller-1.0 >= $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       libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev.
57       on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-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 AC_MSG_CHECKING([to see if compiler understands -Werror])
65 save_CFLAGS="$CFLAGS"
66 CFLAGS="$CFLAGS -Wall -Werror"
67 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
68   GST_CFLAGS="$GST_CFLAGS -Wall -Werror"
69   AC_MSG_RESULT([yes])
70 ], [
71   AC_MSG_RESULT([no])
72 ])
73
74 dnl set the plugindir where plugins should be installed (for src/Makefile.am)
75 if test "x${prefix}" = "x$HOME"; then
76   plugindir="$HOME/.gstreamer-1.0/plugins"
77 else
78   plugindir="\$(libdir)/gstreamer-1.0"
79 fi
80 AC_SUBST(plugindir)
81
82 dnl set proper LDFLAGS for plugins
83 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
84 AC_SUBST(GST_PLUGIN_LDFLAGS)
85
86 AC_CONFIG_FILES([Makefile src/Makefile])
87 AC_OUTPUT