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