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