64d21b3177e83354b1a94ccd76a673856a9aefe1
[platform/adaptation/nexell/gst-plugins-video-dec.git] / configure.ac
1 dnl required version of autoconf
2 AC_PREREQ([2.53])
3
4 dnl Package Name is gstnxvideodec version 0.1.0
5 AC_INIT(gstnxvideodec,[0.1.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])
12 AC_CONFIG_HEADERS([config.h])
13
14 dnl required version of automake
15 AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2])
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
33 dnl our libraries and install dirs use GST_API_VERSION in the filename
34 dnl to allow side-by-side installation of different API versions
35 GST_API_VERSION=1.0
36 AC_SUBST(GST_API_VERSION)
37 AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION",
38   [GStreamer API Version])
39
40 dnl Check for the required version of GStreamer core (and gst-plugins-base)
41 dnl This will export GST_CFLAGS and GST_LIBS variables for use in Makefile.am
42 dnl
43 dnl If you need libraries from gst-plugins-base here, also add:
44 dnl for libgstaudio-1.0: gstreamer-audio-1.0 >= $GST_REQUIRED
45 dnl for libgstvideo-1.0: gstreamer-video-1.0 >= $GST_REQUIRED
46 dnl for libgsttag-1.0: gstreamer-tag-1.0 >= $GST_REQUIRED
47 dnl for libgstpbutils-1.0: gstreamer-pbutils-1.0 >= $GST_REQUIRED
48 dnl for libgstfft-1.0: gstreamer-fft-1.0 >= $GST_REQUIRED
49 dnl for libgstinterfaces-1.0: gstreamer-interfaces-1.0 >= $GST_REQUIRED
50 dnl for libgstrtp-1.0: gstreamer-rtp-1.0 >= $GST_REQUIRED
51 dnl for libgstrtsp-1.0: gstreamer-rtsp-1.0 >= $GST_REQUIRED
52 dnl etc.
53 PKG_CHECK_MODULES(GST, [
54   gstreamer-1.0 >= $GST_REQUIRED
55   gstreamer-base-1.0 >= $GST_REQUIRED
56   gstreamer-controller-1.0 >= $GST_REQUIRED
57   gstreamer-audio-1.0 >= $GST_REQUIRED
58 ], [
59   AC_SUBST(GST_CFLAGS)
60   AC_SUBST(GST_LIBS)
61 ], [
62   AC_MSG_ERROR([
63       You need to install or upgrade the GStreamer development
64       packages on your system. On debian-based systems these are
65       libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev.
66       on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-devel
67       or similar. The minimum version required is $GST_REQUIRED.
68   ])
69 ])
70
71 PKG_CHECK_MODULES(MM_COMMON, mm-common)
72 AC_SUBST(MM_COMMON_CFLAGS)
73
74 dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
75 AC_MSG_CHECKING([to see if compiler understands -Wall])
76 save_CFLAGS="$CFLAGS"
77 CFLAGS="$CFLAGS -Wall"
78 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
79   GST_CFLAGS="$GST_CFLAGS -Wall"
80   AC_MSG_RESULT([yes])
81 ], [
82   AC_MSG_RESULT([no])
83 ])
84
85 dnl set the plugindir where plugins should be installed (for src/Makefile.am)
86 if test "x${prefix}" = "x$HOME"; then
87   plugindir="$HOME/.gstreamer-1.0/plugins"
88 else
89   plugindir="\$(libdir)/gstreamer-1.0"
90 fi
91 AC_SUBST(plugindir)
92
93 dnl set proper LDFLAGS for plugins
94 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
95 AC_SUBST(GST_PLUGIN_LDFLAGS)
96
97 AC_CONFIG_FILES([Makefile src/Makefile])
98 AC_OUTPUT
99