ecd1a85077b12d61f84d1d0e391410c3e1a615a1
[gst-am7xxxsink.git] / configure.ac
1 dnl required version of autoconf
2 AC_PREREQ([2.53])
3
4 AC_INIT([gst-fbdevsink],[0.1.0],[http://ao2.it],[gst-fbdevsink])
5
6 dnl required versions of gstreamer and plugins-base
7 GST_REQUIRED=1.0.0
8 GSTPB_REQUIRED=1.0.0
9
10 AC_CONFIG_SRCDIR([src/gstfbdevsink.c])
11 AC_CONFIG_HEADERS([config.h])
12
13 dnl required version of automake
14 AM_INIT_AUTOMAKE([1.10])
15
16 dnl enable mainainer mode by default
17 AM_MAINTAINER_MODE([enable])
18
19 dnl check for tools (compiler etc.)
20 AC_PROG_CC
21
22 dnl required version of libtool
23 LT_PREREQ([2.2.6])
24 LT_INIT
25
26 dnl give error and exit if we don't have pkgconfig
27 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, [ ], [
28   AC_MSG_ERROR([You need to have pkg-config installed!])
29 ])
30
31 PKG_CHECK_MODULES(GST, [
32   gstreamer-1.0 >= $GST_REQUIRED
33   gstreamer-base-1.0 >= $GST_REQUIRED
34   gstreamer-controller-1.0 >= $GST_REQUIRED
35 ], [
36   AC_SUBST(GST_CFLAGS)
37   AC_SUBST(GST_LIBS)
38 ], [
39   AC_MSG_ERROR([
40       You need to install or upgrade the GStreamer development
41       packages on your system. On debian-based systems these are
42       libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev.
43       on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-devel
44       or similar. The minimum version required is $GST_REQUIRED.
45   ])
46 ])
47
48 dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
49 AC_MSG_CHECKING([to see if compiler understands -Wall])
50 save_CFLAGS="$CFLAGS"
51 CFLAGS="$CFLAGS -Wall"
52 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
53   GST_CFLAGS="$GST_CFLAGS -Wall"
54   AC_MSG_RESULT([yes])
55 ], [
56   AC_MSG_RESULT([no])
57 ])
58
59 dnl set the plugindir where plugins should be installed (for src/Makefile.am)
60 if test "x${prefix}" = "x$HOME"; then
61   plugindir="$HOME/.gstreamer-1.0/plugins"
62 else
63   plugindir="\$(libdir)/gstreamer-1.0"
64 fi
65 AC_SUBST(plugindir)
66
67 dnl set proper LDFLAGS for plugins
68 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
69 AC_SUBST(GST_PLUGIN_LDFLAGS)
70
71 AC_CONFIG_FILES([Makefile src/Makefile])
72 AC_OUTPUT
73