libgnomevfs2-mythtv/configure.ac
branchtrunk
changeset 359 c7d4b123ac31
child 396 ab0098a886e3
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libgnomevfs2-mythtv/configure.ac	Tue Feb 13 23:22:07 2007 +0000
     1.3 @@ -0,0 +1,115 @@
     1.4 +AC_INIT(libgnomevfs2-mythtv, 0.1)
     1.5 +
     1.6 +dnl when going to/from release please set the nano (fourth number) right !
     1.7 +dnl releases only do Wall, cvs and prerelease does Werror too
     1.8 +AS_VERSION(libgnomevfs2-mythtv, LIBGNOMEVFS2_MYTHTV, 0, 1, 0, 1, LIBGNOMEVFS2_MYTHTV_CVS="no", LIBGNOMEVFS2_MYTHTV_CVS="yes")
     1.9 +
    1.10 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    1.11 +
    1.12 +AM_CONFIG_HEADER(config.h)
    1.13 +
    1.14 +AM_DISABLE_STATIC
    1.15 +
    1.16 +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    1.17 +AM_MAINTAINER_MODE
    1.18 +dnl make aclocal work in maintainer mode
    1.19 +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    1.20 +
    1.21 +dnl check for tools
    1.22 +dnl Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    1.23 +CFLAGS="$CFLAGS "
    1.24 +AC_PROG_CC
    1.25 +AC_PROG_CPP
    1.26 +AM_PROG_CC_STDC
    1.27 +AC_HEADER_STDC
    1.28 +AC_PROG_LIBTOOL
    1.29 +
    1.30 +dnl Test if --enable-debug given
    1.31 +AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[enable debugging mode])])
    1.32 +if test "x$enable_debug" = "xyes" ; then
    1.33 +      CFLAGS="$CFLAGS -g"
    1.34 +fi          
    1.35 +
    1.36 +dnl optimisation flag
    1.37 +CFLAGS="$CFLAGS -O2"
    1.38 +
    1.39 +dnl decide on error flags
    1.40 +AS_COMPILER_FLAG(-Wall, LIBGNOMEVFS2_MYTHTV_WALL="yes", LIBGNOMEVFS2_MYTHTV_WALL="no")
    1.41 +
    1.42 +if test "x$LIBGNOMEVFS2_MYTHTV_WALL" = "xyes"; then
    1.43 +    CFLAGS="$CFLAGS -Wall"
    1.44 +
    1.45 +    if test "x$LIBGNOMEVFS2_MYTHTV_CVS" = "xyes"; then
    1.46 +       AS_COMPILER_FLAG(-Werror,CFLAGS="$CFLAGS -Werror",)
    1.47 +    fi
    1.48 +fi
    1.49 +                  
    1.50 +dnl Now check required packages
    1.51 +
    1.52 +dnl Check for pkgconfig
    1.53 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    1.54 +dnl Give error and exit if we don't have pkgconfig
    1.55 +if test "x$HAVE_PKGCONFIG" = "xno"; then
    1.56 +  AC_MSG_ERROR(you need to have pkgconfig installed !)
    1.57 +fi
    1.58 +
    1.59 +dnl Check for Glib2.0
    1.60 +PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
    1.61 +
    1.62 +dnl Give error and exit if we don't have glib
    1.63 +if test "x$HAVE_GLIB" = "xno"; then
    1.64 +  AC_MSG_ERROR(you need glib-2.0 installed)
    1.65 +fi
    1.66 +
    1.67 +dnl make GLIB_CFLAGS and GLIB_LIBS available
    1.68 +AC_SUBST(GLIB_CFLAGS)
    1.69 +AC_SUBST(GLIB_LIBS)
    1.70 +
    1.71 +AC_DEFINE(HAVE_GLIB,1,[Defined when glib-2.0 was found])
    1.72 +
    1.73 +dnl Check for GObject2.0
    1.74 +PKG_CHECK_MODULES(GOBJECT, 
    1.75 +  gobject-2.0, 
    1.76 +  HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
    1.77 +
    1.78 +dnl Give error and exit if we don't have gobject
    1.79 +if test "x$HAVE_GOBJECT" = "xno"; then
    1.80 +  AC_MSG_ERROR(you need gobject-2.0 installed)
    1.81 +fi
    1.82 +
    1.83 +dnl make GOBJECT_CFLAGS and GOBJECT_LIBS available
    1.84 +AC_SUBST(GOBJECT_CFLAGS)
    1.85 +AC_SUBST(GOBJECT_LIBS)
    1.86 +
    1.87 +GNOME_VFS_REQS=2.7.4
    1.88 +PKG_CHECK_MODULES(GNOME_VFS, 
    1.89 +  gnome-vfs-2.0 >= $GNOME_VFS_REQS gnome-vfs-module-2.0 >= $GNOME_VFS_REQS,
    1.90 +  HAVE_GNOME_VFS=yes,
    1.91 +  HAVE_GNOME_VFS=no)
    1.92 +
    1.93 +if test x"$HAVE_GNOME_VFS" = xno; then
    1.94 +  AC_MSG_ERROR([You need gnome-vfs2 development packages to compile libgnomevfs2-mythtv])
    1.95 +fi
    1.96 +
    1.97 +AC_SUBST(GNOME_VFS_CFLAGS)
    1.98 +AC_SUBST(GNOME_VFS_LIBS)
    1.99 +
   1.100 +dnl Check for gmyth-0.1
   1.101 +PKG_CHECK_MODULES(LIBGMYTH,
   1.102 +  gmyth-0.1,
   1.103 +  have_libgmyth=yes,
   1.104 +  have_libgmyth=no)
   1.105 +
   1.106 +if test x"$have_libgmyth" = "xno"; then
   1.107 +  AC_MSG_ERROR(gmyth-0.1 not found)        
   1.108 +fi
   1.109 +
   1.110 +AC_SUBST(LIBGMYTH_CFLAGS)
   1.111 +AC_SUBST(LIBGMYTH_LIBS)
   1.112 +
   1.113 +AC_OUTPUT([
   1.114 +Makefile
   1.115 +modules/Makefile
   1.116 +common/Makefile
   1.117 +m4/Makefile
   1.118 +])