[svn r599] Automated test scripts in Python (it will runs over gcov, and generate reports on GMyth library running).
2 # Process this file with autoconf to produce a configure script.
6 AC_INIT([mythtvsrc],[0.1])
8 dnl AC_CONFIG_SRCDIR([src])
9 AC_CONFIG_HEADER(config.h)
11 dnl when going to/from release please set the nano (fourth number) right !
12 dnl releases only do Wall, SVN and prerelease does Werror too
13 AS_VERSION(mythtvsrc, MYTHTVSRC, 0, 1, 0, 3, MYTHTVSRC_SVN="no", MYTHTVSRC_SVN="yes")
15 MYTHTVSRC_MAJORMINOR=$MYTHTVSRC_MAJOR_VERSION.$MYTHTVSRC_MINOR_VERSION
17 AC_SUBST(MYTHTVSRC_MAJORMINOR)
19 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
21 dnl make aclocal work in maintainer mode
22 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
24 # Checks for programs.
26 # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
27 CFLAGS="$CFLAGS -Wall"
30 # Checks for libraries.
32 # Checks for header files.
34 AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
36 # Checks for typedefs, structures, and compiler characteristics.
41 # Checks for library functions.
43 AC_PROG_GCC_TRADITIONAL
47 AC_CHECK_FUNCS([memset socket stime strstr strtoul])
49 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
51 # Checks required packages
53 dnl Test if --disable-debug given
55 [AC_HELP_STRING([--disable-debug], [disable debugging mode])],
56 enable_debug="$enableval",
59 if test "x$enable_debug" = "xyes" ; then
62 AC_DEFINE( NDEBUG, 1, [disable debug messages] )
63 CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
66 AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
69 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
70 # Give error and exit if we don't have pkgconfig
71 if test "x$HAVE_PKGCONFIG" = "xno"; then
72 AC_MSG_ERROR(you need to have pkgconfig installed !)
76 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
78 # Give error and exit if we don't have glib
79 if test "x$HAVE_GLIB" = "xno"; then
80 AC_MSG_ERROR(you need glib-2.0 installed)
83 # make GLIB_CFLAGS and GLIB_LIBS available
87 # Check for GObject2.0
88 PKG_CHECK_MODULES(GOBJECT,
90 HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
92 # Give error and exit if we don't have gobject
93 if test "x$HAVE_GOBJECT" = "xno"; then
94 AC_MSG_ERROR(you need gobject-2.0 installed)
97 # make GOBJECT_CFLAGS and GOBJECT_LIBS available
98 AC_SUBST(GOBJECT_CFLAGS)
99 AC_SUBST(GOBJECT_LIBS)
102 PKG_CHECK_MODULES(GMYTH,
104 HAVE_GMYTH=yes, HAVE_GMYTH=no)
106 # Give error and exit if we don't have gobject
107 if test "x$HAVE_GMYTH" = "xno"; then
108 AC_MSG_ERROR(you need gmyth must to be installed)
111 # make GMYTH_CFLAGS and GMYTH_LIBS available
112 AC_SUBST(GMYTH_CFLAGS)
115 # GStreamer version required
119 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
120 AC_SUBST(GST_PLUGINS_DIR)
121 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GST_PLUGINS_DIR)
123 dnl this really should only contain flags, not libs - they get added before
124 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
125 GST_PLUGIN_LDFLAGS="-module -avoid-version $GST_PLUGINS_DIR"
126 AC_SUBST(GST_PLUGIN_LDFLAGS)
128 # check for gstreamer development files
129 PKG_CHECK_MODULES(GST, \
130 gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
131 HAVE_GST=yes, HAVE_GST=no)
133 # Give error and exit if we don't have gstreamer
134 if test "x$HAVE_GST" = "xno"; then
135 AC_MSG_ERROR(you need gstreamer development packages installed !)
138 # make GST_CFLAGS and GST_LIBS available
142 # check for gstreamer-base plugins (xoverlay interface)
143 GST_BASE_REQUIRED=0.10
144 GST_BASE_MAJORMINOR=0.10
145 PKG_CHECK_MODULES(GST_BASE, \
146 gstreamer-base-$GST_BASE_MAJORMINOR >= $GST_BASE_REQUIRED,
147 HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
149 # Give error and exit if we don't have gstreamer base libraries
150 if test "x$HAVE_GST_BASE" = "xno"; then
151 AC_MSG_ERROR(you need gstreamer base development packages installed !)
154 # make GST_BASE_CFLAGS and GST_BASE_LIBS available
155 AC_SUBST(GST_BASE_CFLAGS)
156 AC_SUBST(GST_BASE_LIBS)
158 # make GST_MAJORMINOR available in Makefile.am
159 AC_SUBST(GST_MAJORMINOR)
161 AC_DEFINE(GST_LICENSE, "LGPL", [License for Distribution])
163 AC_DEFINE(GST_PACKAGE_NAME, "GStreamer", [Gstremar package name])
165 AC_DEFINE(GST_PACKAGE_ORIGIN, "http://gstreamer.net/", [Origin of this package] )