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 check for tools (compiler etc.)
 
  22 dnl required version of libtool
 
  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!])
 
  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
 
  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.
 
  48 dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
 
  49 AC_MSG_CHECKING([to see if compiler understands -Wall])
 
  51 CFLAGS="$CFLAGS -Wall"
 
  52 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
 
  53   GST_CFLAGS="$GST_CFLAGS -Wall"
 
  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"
 
  63   plugindir="\$(libdir)/gstreamer-1.0"
 
  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)
 
  71 AC_CONFIG_FILES([Makefile src/Makefile])