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