2010-06-30 08:25:50 +00:00
|
|
|
AC_PREREQ(2.60)
|
2004-03-05 10:46:24 +00:00
|
|
|
|
2006-04-01 10:07:07 +00:00
|
|
|
dnl initialize autoconf
|
2004-06-21 09:52:03 +00:00
|
|
|
dnl when going to/from release please set the nano (fourth number) right !
|
2006-04-01 10:07:07 +00:00
|
|
|
dnl releases only do Wall, cvs and prerelease does Werror too
|
2012-07-30 20:24:10 +00:00
|
|
|
AC_INIT(GStreamer GObject Introspectin tests for Python , 0.11.92,
|
2006-04-01 10:07:07 +00:00
|
|
|
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
|
|
|
|
gst-python)
|
2004-03-05 10:46:24 +00:00
|
|
|
|
2012-08-08 17:59:09 +00:00
|
|
|
AG_GST_INIT
|
|
|
|
|
2006-04-01 10:07:07 +00:00
|
|
|
dnl initialize automake
|
2010-06-30 08:25:50 +00:00
|
|
|
AM_INIT_AUTOMAKE([-Wno-portability 1.10])
|
2004-03-05 10:46:24 +00:00
|
|
|
|
2006-04-01 10:07:07 +00:00
|
|
|
dnl define PACKAGE_VERSION_* variables
|
|
|
|
AS_VERSION
|
2002-03-24 04:32:10 +00:00
|
|
|
|
2006-04-01 10:07:07 +00:00
|
|
|
dnl check if this is a release version
|
|
|
|
AS_NANO(GST_CVS="no", GST_CVS="yes")
|
|
|
|
|
|
|
|
dnl can autoconf find the source ?
|
2012-07-30 20:24:10 +00:00
|
|
|
AC_CONFIG_SRCDIR([testsuite/common.py])
|
2006-04-01 10:07:07 +00:00
|
|
|
|
|
|
|
dnl define the output header for config
|
|
|
|
AM_CONFIG_HEADER([config.h])
|
|
|
|
|
|
|
|
dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2010-02-26 14:46:58 +00:00
|
|
|
dnl use pretty build output with automake >= 1.11
|
|
|
|
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
|
|
|
|
[AM_DEFAULT_VERBOSITY=1
|
|
|
|
AC_SUBST(AM_DEFAULT_VERBOSITY)])
|
|
|
|
|
2003-06-11 20:32:29 +00:00
|
|
|
dnl Add parameters for aclocal
|
2010-05-28 09:32:28 +00:00
|
|
|
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
|
2002-03-24 04:32:10 +00:00
|
|
|
|
2003-06-11 20:32:29 +00:00
|
|
|
dnl required versions of other packages
|
2012-07-30 20:24:10 +00:00
|
|
|
dnl Note that they are runtime requirements
|
|
|
|
AC_SUBST(GST_REQ, 0.11.92)
|
2012-08-08 18:00:05 +00:00
|
|
|
AC_SUBST(PYGOBJECT_REQ, 3.0)
|
|
|
|
|
|
|
|
AC_DISABLE_STATIC
|
|
|
|
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
dnl find a compiler
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CC_STDC
|
|
|
|
|
|
|
|
dnl check if the compiler supports '-c' and '-o' options
|
|
|
|
AM_PROG_CC_C_O
|
2006-07-03 13:32:08 +00:00
|
|
|
|
2002-03-24 04:32:10 +00:00
|
|
|
dnl check for python
|
2012-08-08 17:59:09 +00:00
|
|
|
dnl AM_PATH_PYTHON(2.5)
|
2002-03-24 04:32:10 +00:00
|
|
|
AM_PATH_PYTHON
|
2012-07-30 20:24:10 +00:00
|
|
|
AC_MSG_CHECKING(for python >= 2.5)
|
2002-03-24 04:32:10 +00:00
|
|
|
prog="
|
|
|
|
import sys, string
|
2012-07-30 20:24:10 +00:00
|
|
|
minver = (2,5,0,'final',0)
|
2002-03-24 04:32:10 +00:00
|
|
|
if sys.version_info < minver:
|
|
|
|
sys.exit(1)
|
|
|
|
sys.exit(0)"
|
2003-06-11 20:32:29 +00:00
|
|
|
|
2012-08-08 18:00:05 +00:00
|
|
|
|
2002-03-24 04:32:10 +00:00
|
|
|
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
|
|
|
|
then
|
|
|
|
AC_MSG_RESULT(okay)
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR(too old)
|
|
|
|
fi
|
2012-08-08 18:00:05 +00:00
|
|
|
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
|
2012-08-08 17:59:09 +00:00
|
|
|
AS_AC_EXPAND(PYTHONDIR, $pythondir)
|
|
|
|
AS_AC_EXPAND(PYEXECDIR, $pyexecdir)
|
|
|
|
|
|
|
|
AC_ARG_WITH([pygi_overrides_dir],
|
|
|
|
AC_HELP_STRING([--with-pygi-overrides-dir], [Path to pygobject overrides directory]))
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for pygobject overrides directory)
|
|
|
|
if test "x$with_pygi_overrides_dir" = "x" ; then
|
|
|
|
overrides_dir="`$PYTHON -c 'import gi; print(gi._overridesdir)' 2>/dev/null`"
|
|
|
|
# fallback if the previous failed
|
|
|
|
if test "x$overrides_dir" = "x" ; then
|
|
|
|
overrides_dir="${pyexecdir}/gi/overrides"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
overrides_dir="$with_pygi_overrides_dir"
|
|
|
|
fi
|
|
|
|
|
|
|
|
PYGI_OVERRIDES_DIR="$overrides_dir"
|
|
|
|
AC_SUBST(PYGI_OVERRIDES_DIR)
|
|
|
|
AC_MSG_RESULT($PYGI_OVERRIDES_DIR)
|
|
|
|
|
2012-08-08 18:00:05 +00:00
|
|
|
dnl check for GStreamer
|
|
|
|
GST_API_VERSION=1.0
|
|
|
|
AC_SUBST(GST_API_VERSION)
|
|
|
|
PKG_CHECK_MODULES(GST, gstreamer-$GST_API_VERSION >= $GST_REQ)
|
|
|
|
AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION", [Gst API version])
|
|
|
|
GST_CFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS"
|
|
|
|
AC_SUBST(GST_CFLAGS)
|
|
|
|
AC_SUBST(GST_LIBS)
|
|
|
|
|
|
|
|
dnl check for pygobject
|
|
|
|
PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0 >= $PYGOBJECT_REQ,
|
|
|
|
[
|
|
|
|
HAVE_PYGOBJECT="yes"
|
|
|
|
], HAVE_PYGOBJECT="no")
|
|
|
|
|
|
|
|
AC_SUBST(PYGOBJECT_CFLAGS)
|
|
|
|
|
2012-08-08 17:59:09 +00:00
|
|
|
dnl and set the override directory
|
|
|
|
AC_ARG_WITH([pygi_overrides_dir],
|
|
|
|
AC_HELP_STRING([--with-pygi-overrides-dir], [Path to pygobject overrides directory]))
|
2003-06-11 20:32:29 +00:00
|
|
|
|
2007-02-28 22:09:33 +00:00
|
|
|
AG_GST_VALGRIND_CHECK
|
2005-10-07 07:19:17 +00:00
|
|
|
|
2011-10-29 15:01:24 +00:00
|
|
|
dnl set release date/time
|
2012-08-08 17:59:09 +00:00
|
|
|
#AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
|
|
|
|
#["${srcdir}/gst-python.doap"],
|
|
|
|
#[$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])
|
2011-10-29 15:01:24 +00:00
|
|
|
|
2003-06-11 20:32:29 +00:00
|
|
|
AC_OUTPUT([
|
2002-03-24 04:32:10 +00:00
|
|
|
Makefile
|
2008-12-05 08:49:05 +00:00
|
|
|
common/Makefile
|
|
|
|
common/m4/Makefile
|
2005-10-03 17:52:07 +00:00
|
|
|
examples/Makefile
|
2003-10-04 13:37:45 +00:00
|
|
|
testsuite/Makefile
|
2012-08-08 17:59:09 +00:00
|
|
|
gi/Makefile
|
|
|
|
gi/overrides/Makefile
|
2003-06-11 20:32:29 +00:00
|
|
|
])
|