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