melunko@38: AC_INIT(libgnomevfs2-mythtv, 0.1) melunko@38: melunko@38: dnl when going to/from release please set the nano (fourth number) right ! melunko@38: dnl releases only do Wall, cvs and prerelease does Werror too melunko@38: AS_VERSION(libgnomevfs2-mythtv, LIBGNOMEVFS2_MYTHTV, 0, 1, 0, 1, LIBGNOMEVFS2_MYTHTV_CVS="no", LIBGNOMEVFS2_MYTHTV_CVS="yes") melunko@38: melunko@38: AM_INIT_AUTOMAKE($PACKAGE, $VERSION) melunko@38: melunko@38: AM_CONFIG_HEADER(config.h) melunko@38: melunko@38: AM_DISABLE_STATIC melunko@38: melunko@38: dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode melunko@38: AM_MAINTAINER_MODE melunko@38: dnl make aclocal work in maintainer mode melunko@38: AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") melunko@38: melunko@38: dnl check for tools melunko@38: dnl Make sure CFLAGS is defined to stop AC_PROC_CC adding -g melunko@38: CFLAGS="$CFLAGS " melunko@38: AC_PROG_CC melunko@38: AC_PROG_CPP melunko@38: AM_PROG_CC_STDC melunko@38: AC_HEADER_STDC melunko@38: AC_PROG_LIBTOOL melunko@38: melunko@38: dnl Test if --enable-debug given melunko@38: AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[enable debugging mode])]) melunko@38: if test "x$enable_debug" = "xyes" ; then melunko@38: CFLAGS="$CFLAGS -g" melunko@38: fi melunko@38: melunko@38: dnl optimisation flag melunko@38: CFLAGS="$CFLAGS -O2" melunko@38: melunko@38: dnl decide on error flags melunko@38: AS_COMPILER_FLAG(-Wall, LIBGNOMEVFS2_MYTHTV_WALL="yes", LIBGNOMEVFS2_MYTHTV_WALL="no") melunko@38: melunko@38: if test "x$LIBGNOMEVFS2_MYTHTV_WALL" = "xyes"; then melunko@38: CFLAGS="$CFLAGS -Wall" melunko@38: melunko@38: if test "x$LIBGNOMEVFS2_MYTHTV_CVS" = "xyes"; then melunko@38: AS_COMPILER_FLAG(-Werror,CFLAGS="$CFLAGS -Werror",) melunko@38: fi melunko@38: fi melunko@38: melunko@38: dnl Now check required packages melunko@38: melunko@38: dnl Check for pkgconfig melunko@38: AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) melunko@38: dnl Give error and exit if we don't have pkgconfig melunko@38: if test "x$HAVE_PKGCONFIG" = "xno"; then melunko@38: AC_MSG_ERROR(you need to have pkgconfig installed !) melunko@38: fi melunko@38: melunko@38: dnl Check for Glib2.0 melunko@38: PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no) melunko@38: melunko@38: dnl Give error and exit if we don't have glib melunko@38: if test "x$HAVE_GLIB" = "xno"; then melunko@38: AC_MSG_ERROR(you need glib-2.0 installed) melunko@38: fi melunko@38: melunko@38: dnl make GLIB_CFLAGS and GLIB_LIBS available melunko@38: AC_SUBST(GLIB_CFLAGS) melunko@38: AC_SUBST(GLIB_LIBS) melunko@38: melunko@38: AC_DEFINE(HAVE_GLIB,1,[Defined when glib-2.0 was found]) melunko@38: melunko@38: dnl Check for GObject2.0 melunko@38: PKG_CHECK_MODULES(GOBJECT, melunko@38: gobject-2.0, melunko@38: HAVE_GOBJECT=yes, HAVE_GOBJECT=no) melunko@38: melunko@38: dnl Give error and exit if we don't have gobject melunko@38: if test "x$HAVE_GOBJECT" = "xno"; then melunko@38: AC_MSG_ERROR(you need gobject-2.0 installed) melunko@38: fi melunko@38: melunko@38: dnl make GOBJECT_CFLAGS and GOBJECT_LIBS available melunko@38: AC_SUBST(GOBJECT_CFLAGS) melunko@38: AC_SUBST(GOBJECT_LIBS) melunko@38: melunko@38: GNOME_VFS_REQS=2.7.4 melunko@38: PKG_CHECK_MODULES(GNOME_VFS, melunko@38: gnome-vfs-2.0 >= $GNOME_VFS_REQS gnome-vfs-module-2.0 >= $GNOME_VFS_REQS, melunko@38: HAVE_GNOME_VFS=yes, melunko@38: HAVE_GNOME_VFS=no) melunko@38: melunko@38: if test x"$HAVE_GNOME_VFS" = xno; then melunko@38: AC_MSG_ERROR([You need gnome-vfs2 development packages to compile libgnomevfs2-mythtv]) melunko@38: fi melunko@38: melunko@38: AC_SUBST(GNOME_VFS_CFLAGS) melunko@38: AC_SUBST(GNOME_VFS_LIBS) melunko@38: melunko@38: dnl Check for gmyth-0.1 melunko@38: PKG_CHECK_MODULES(LIBGMYTH, melunko@38: gmyth-0.1, melunko@38: have_libgmyth=yes, melunko@38: have_libgmyth=no) melunko@38: melunko@38: if test x"$have_libgmyth" = "xno"; then melunko@38: AC_MSG_ERROR(gmyth-0.1 not found) melunko@38: fi melunko@38: melunko@38: AC_SUBST(LIBGMYTH_CFLAGS) melunko@38: AC_SUBST(LIBGMYTH_LIBS) melunko@38: melunko@38: AC_OUTPUT([ melunko@38: Makefile melunko@38: modules/Makefile melunko@38: common/Makefile melunko@38: m4/Makefile melunko@38: ])