renatofilho@611: dnl fill in your package name and version here
renatofilho@611: dnl autoconf configuration files for gst-plugins-dspbin
renatofilho@611: AC_INIT
renatofilho@611: AC_CANONICAL_TARGET
renatofilho@608: 
renatofilho@611: AC_CONFIG_MACRO_DIR([m4])
renatofilho@611: dnl We disable static building for development, for time savings
renatofilho@611: dnl this goes before AS_LIBTOOL to appease autoconf
renatofilho@611: dnl *NOTE*: dnl this line before release, so release does static too
renatofilho@611: AM_DISABLE_STATIC
renatofilho@608: 
renatofilho@611: dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
renatofilho@611: AM_MAINTAINER_MODE
renatofilho@608: 
renatofilho@608: dnl when going to/from release please set the nano (fourth number) right !
renatofilho@611: dnl releases only do Wall, cvs and prerelease does Werror too
renatofilho@611: AS_VERSION(gst-indt-plugins, GST_PLUGINS_VERSION, 0, 10, 0, 1, GST_CVS="no", GST_CVS="yes")
renatofilho@608: 
renatofilho@611: AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
renatofilho@608: 
renatofilho@611: AM_PROG_LIBTOOL
renatofilho@608: 
renatofilho@611: AM_CONFIG_HEADER(config.h)
renatofilho@611: 
renatofilho@608: dnl make aclocal work in maintainer mode
renatofilho@608: AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
renatofilho@608: 
renatofilho@611: dnl check for tools
renatofilho@608: AC_PROG_CC
renatofilho@611: AC_PROG_CC_STDC
renatofilho@611: AM_PROG_AS
renatofilho@608: 
renatofilho@611: dnl decide on error flags
renatofilho@611: AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
renatofilho@608: 
renatofilho@611: if test "x$GST_WALL" = "xyes"; then
renatofilho@611:   ERROR_CFLAGS="$GST_ERROR -Wall"
renatofilho@608: 
renatofilho@611:   if test "x$GST_CVS" = "xyes"; then
renatofilho@611:     AS_COMPILER_FLAG(-Werror,ERROR_CFLAGS="$ERROR_CFLAGS -Werror",ERROR_CFLAGS="$ERROR_CFLAGS")
renatofilho@611:   fi
renatofilho@611: fi
renatofilho@608: 
renatofilho@611: AC_SUBST(ERROR_CFLAGS)
renatofilho@608: 
renatofilho@611: dnl determine c++ compiler
renatofilho@611: AC_PROG_CXX
renatofilho@611: dnl determine if c++ is available on this system
renatofilho@611: AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
renatofilho@611: dnl determine c++ preprocessor
renatofilho@611: AC_PROG_CXXCPP
renatofilho@611: AC_ISC_POSIX
renatofilho@608: 
renatofilho@611: AC_HEADER_STDC([])
renatofilho@611: AC_C_INLINE
renatofilho@608: 
renatofilho@611: dnl Check for pkgconfig first
renatofilho@611: AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
renatofilho@608: 
renatofilho@611: dnl Give error and exit if we don't have pkgconfig
renatofilho@608: if test "x$HAVE_PKGCONFIG" = "xno"; then
renatofilho@608:   AC_MSG_ERROR(you need to have pkgconfig installed !)
renatofilho@608: fi
renatofilho@608: 
renatofilho@611: dnl Now we're ready to ask for gstreamer libs and cflags
renatofilho@611: dnl And we can also ask for the right version of gstreamer
renatofilho@608: 
renatofilho@611: GST_REQUIRED=0.10.3
renatofilho@608: GST_MAJORMINOR=0.10
renatofilho@608: 
renatofilho@608: PKG_CHECK_MODULES(GST, \
renatofilho@608:   gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
renatofilho@611:   HAVE_GST=yes,HAVE_GST=no)
renatofilho@608: 
renatofilho@611: dnl Give error and exit if we don't have gstreamer
renatofilho@608: if test "x$HAVE_GST" = "xno"; then
renatofilho@608:   AC_MSG_ERROR(you need gstreamer development packages installed !)
renatofilho@608: fi
renatofilho@608: 
renatofilho@611: if test "x$USE_DEBUG" = xyes; then
renatofilho@611:   GST_CFLAGS="$GST_CFLAGS -g"
renatofilho@611: fi
renatofilho@611: 
renatofilho@611: dnl added because of the i18n headers
renatofilho@611: GST_CFLAGS="-I\$(top_builddir)/gst-libs $GST_CFLAGS"
renatofilho@611: 
renatofilho@611: dnl make GST_CFLAGS and GST_LIBS available
renatofilho@608: AC_SUBST(GST_CFLAGS)
renatofilho@608: AC_SUBST(GST_LIBS)
renatofilho@608: 
renatofilho@611: dnl make GST_MAJORMINOR available in Makefile.am
renatofilho@611: AC_SUBST(GST_MAJORMINOR)
renatofilho@608: 
renatofilho@611: dnl check for gstreamer-base; uninstalled is selected preferentially
renatofilho@611: PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
renatofilho@611:   HAVE_GST_BASE="yes", HAVE_GST_BASE="no")
renatofilho@611: 
renatofilho@608: if test "x$HAVE_GST_BASE" = "xno"; then
renatofilho@611:   AC_MSG_ERROR(no GStreamer Base Libs found)
renatofilho@608: fi
renatofilho@608: 
renatofilho@611: AC_SUBST(GST_BASE_LIBS)
renatofilho@608: AC_SUBST(GST_BASE_CFLAGS)
renatofilho@608: 
renatofilho@611: dnl check for gstreamer-libs; uinstalled is selected preferentially
renatofilho@611: PKG_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQUIRED,
renatofilho@611:   HAVE_GST_PLUGINS="yes", HAVE_GST_PLUGINS="no")
renatofilho@611: 
renatofilho@611: if test "x$HAVE_GST_PLUGINS" = "xno"; then
renatofilho@611:   AC_MSG_ERROR(no GStreamer Plugins Libs found)
renatofilho@611: fi
renatofilho@611: 
renatofilho@611: AC_SUBST(GST_PLUGINS_BASE_LIBS)
renatofilho@611: AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
renatofilho@611: 
renatofilho@611: PKG_CHECK_MODULES(GMYTH, gmyth >= 0.3, HAVE_GMYTH=yes,HAVE_GMYTH=no)
renatofilho@611: if test "x$HAVE_GMYTH" = "xno"; then
renatofilho@611:   AC_MSG_ERROR(you need gmyth >= 0.3 installed)
renatofilho@611: fi
renatofilho@611: AC_SUBST(GMYTH_CFLAGS)
renatofilho@611: AC_SUBST(GMYTH_LIBS)
renatofilho@611: 
renatofilho@611: dnl set the plugindir where plugins should be installed
renatofilho@611: plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
renatofilho@611: AC_SUBST(plugindir)
renatofilho@611: 
renatofilho@611: dnl set proper LDFLAGS for plugins
renatofilho@611: GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
renatofilho@611: AC_SUBST(GST_PLUGIN_LDFLAGS)
renatofilho@608: 
renatofilho@608: AC_DEFINE(GST_LICENSE, "LGPL", [License for Distribution])
renatofilho@611: AC_DEFINE(GST_PACKAGE_NAME, "INdT plugins to Gstreamer ", [package name])
renatofilho@611: AC_DEFINE(GST_PACKAGE_ORIGIN, "https://svn.sourceforge.net/svnroot/gmyth/gst-gmyth", [Origin of this package] )
renatofilho@608: 
renatofilho@611: AC_OUTPUT( \
renatofilho@611:     Makefile \
renatofilho@611:     nuvdemux/Makefile \
renatofilho@611:     mythsrc/Makefile \
renatofilho@611:     concatmux/Makefile
renatofilho@611: )
renatofilho@608: