1 dnl required version of autoconf
4 AC_INIT([gst-am7xxxsink],[0.1.0],[http://ao2.it],[gst-am7xxxsink])
6 dnl required versions of gstreamer and plugins-base
10 AC_CONFIG_SRCDIR([src/gstam7xxxsink.c])
11 AC_CONFIG_HEADERS([config.h])
13 dnl required version of automake
14 AM_INIT_AUTOMAKE([1.10])
16 dnl enable mainainer mode by default
17 AM_MAINTAINER_MODE([enable])
19 dnl use pretty build output with automake >= 1.11
20 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
21 [AM_DEFAULT_VERBOSITY=1
22 AC_SUBST(AM_DEFAULT_VERBOSITY)])
24 dnl check for tools (compiler etc.)
27 dnl required version of libtool
31 dnl give error and exit if we don't have pkgconfig
32 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, [ ], [
33 AC_MSG_ERROR([You need to have pkg-config installed!])
36 PKG_CHECK_MODULES(GST, [
37 gstreamer-1.0 >= $GST_REQUIRED
38 gstreamer-base-1.0 >= $GST_REQUIRED
39 gstreamer-controller-1.0 >= $GST_REQUIRED
40 gstreamer-video-1.0 >= $GST_REQUIRED
46 You need to install or upgrade the GStreamer development
47 packages on your system. On debian-based systems these are
48 libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev.
49 on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-devel
50 or similar. The minimum version required is $GST_REQUIRED.
54 PKG_CHECK_MODULES(LIBAM7XXX, [
57 AC_SUBST(LIBAM7XXX_CFLAGS)
58 AC_SUBST(LIBAM7XXX_LIBS)
65 dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
66 AC_MSG_CHECKING([to see if compiler understands -Wall])
68 CFLAGS="$CFLAGS -Wall"
69 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
70 GST_CFLAGS="$GST_CFLAGS -Wall"
76 dnl set the plugindir where plugins should be installed (for src/Makefile.am)
77 if test "x${prefix}" = "x$HOME"; then
78 plugindir="$HOME/.gstreamer-1.0/plugins"
80 plugindir="\$(libdir)/gstreamer-1.0"
84 dnl set proper LDFLAGS for plugins
85 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
86 AC_SUBST(GST_PLUGIN_LDFLAGS)
88 AC_CONFIG_FILES([Makefile src/Makefile])