libgnomevfs2-mythtv/configure.ac
author rosfran
Thu Feb 08 21:56:58 2007 +0000 (2007-02-08)
branchtrunk
changeset 340 84fb21f6941f
child 396 ab0098a886e3
permissions -rwxr-xr-x
[svn r342] Put back the do_get_file_info to the LiveTV.
melunko@38
     1
AC_INIT(libgnomevfs2-mythtv, 0.1)
melunko@38
     2
melunko@38
     3
dnl when going to/from release please set the nano (fourth number) right !
melunko@38
     4
dnl releases only do Wall, cvs and prerelease does Werror too
melunko@38
     5
AS_VERSION(libgnomevfs2-mythtv, LIBGNOMEVFS2_MYTHTV, 0, 1, 0, 1, LIBGNOMEVFS2_MYTHTV_CVS="no", LIBGNOMEVFS2_MYTHTV_CVS="yes")
melunko@38
     6
melunko@38
     7
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
melunko@38
     8
melunko@38
     9
AM_CONFIG_HEADER(config.h)
melunko@38
    10
melunko@38
    11
AM_DISABLE_STATIC
melunko@38
    12
melunko@38
    13
dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
melunko@38
    14
AM_MAINTAINER_MODE
melunko@38
    15
dnl make aclocal work in maintainer mode
melunko@38
    16
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
melunko@38
    17
melunko@38
    18
dnl check for tools
melunko@38
    19
dnl Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
melunko@38
    20
CFLAGS="$CFLAGS "
melunko@38
    21
AC_PROG_CC
melunko@38
    22
AC_PROG_CPP
melunko@38
    23
AM_PROG_CC_STDC
melunko@38
    24
AC_HEADER_STDC
melunko@38
    25
AC_PROG_LIBTOOL
melunko@38
    26
melunko@38
    27
dnl Test if --enable-debug given
melunko@38
    28
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[enable debugging mode])])
melunko@38
    29
if test "x$enable_debug" = "xyes" ; then
melunko@38
    30
      CFLAGS="$CFLAGS -g"
melunko@38
    31
fi          
melunko@38
    32
melunko@38
    33
dnl optimisation flag
melunko@38
    34
CFLAGS="$CFLAGS -O2"
melunko@38
    35
melunko@38
    36
dnl decide on error flags
melunko@38
    37
AS_COMPILER_FLAG(-Wall, LIBGNOMEVFS2_MYTHTV_WALL="yes", LIBGNOMEVFS2_MYTHTV_WALL="no")
melunko@38
    38
melunko@38
    39
if test "x$LIBGNOMEVFS2_MYTHTV_WALL" = "xyes"; then
melunko@38
    40
    CFLAGS="$CFLAGS -Wall"
melunko@38
    41
melunko@38
    42
    if test "x$LIBGNOMEVFS2_MYTHTV_CVS" = "xyes"; then
melunko@38
    43
       AS_COMPILER_FLAG(-Werror,CFLAGS="$CFLAGS -Werror",)
melunko@38
    44
    fi
melunko@38
    45
fi
melunko@38
    46
                  
melunko@38
    47
dnl Now check required packages
melunko@38
    48
melunko@38
    49
dnl Check for pkgconfig
melunko@38
    50
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
melunko@38
    51
dnl Give error and exit if we don't have pkgconfig
melunko@38
    52
if test "x$HAVE_PKGCONFIG" = "xno"; then
melunko@38
    53
  AC_MSG_ERROR(you need to have pkgconfig installed !)
melunko@38
    54
fi
melunko@38
    55
melunko@38
    56
dnl Check for Glib2.0
melunko@38
    57
PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
melunko@38
    58
melunko@38
    59
dnl Give error and exit if we don't have glib
melunko@38
    60
if test "x$HAVE_GLIB" = "xno"; then
melunko@38
    61
  AC_MSG_ERROR(you need glib-2.0 installed)
melunko@38
    62
fi
melunko@38
    63
melunko@38
    64
dnl make GLIB_CFLAGS and GLIB_LIBS available
melunko@38
    65
AC_SUBST(GLIB_CFLAGS)
melunko@38
    66
AC_SUBST(GLIB_LIBS)
melunko@38
    67
melunko@38
    68
AC_DEFINE(HAVE_GLIB,1,[Defined when glib-2.0 was found])
melunko@38
    69
melunko@38
    70
dnl Check for GObject2.0
melunko@38
    71
PKG_CHECK_MODULES(GOBJECT, 
melunko@38
    72
  gobject-2.0, 
melunko@38
    73
  HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
melunko@38
    74
melunko@38
    75
dnl Give error and exit if we don't have gobject
melunko@38
    76
if test "x$HAVE_GOBJECT" = "xno"; then
melunko@38
    77
  AC_MSG_ERROR(you need gobject-2.0 installed)
melunko@38
    78
fi
melunko@38
    79
melunko@38
    80
dnl make GOBJECT_CFLAGS and GOBJECT_LIBS available
melunko@38
    81
AC_SUBST(GOBJECT_CFLAGS)
melunko@38
    82
AC_SUBST(GOBJECT_LIBS)
melunko@38
    83
melunko@38
    84
GNOME_VFS_REQS=2.7.4
melunko@38
    85
PKG_CHECK_MODULES(GNOME_VFS, 
melunko@38
    86
  gnome-vfs-2.0 >= $GNOME_VFS_REQS gnome-vfs-module-2.0 >= $GNOME_VFS_REQS,
melunko@38
    87
  HAVE_GNOME_VFS=yes,
melunko@38
    88
  HAVE_GNOME_VFS=no)
melunko@38
    89
melunko@38
    90
if test x"$HAVE_GNOME_VFS" = xno; then
melunko@38
    91
  AC_MSG_ERROR([You need gnome-vfs2 development packages to compile libgnomevfs2-mythtv])
melunko@38
    92
fi
melunko@38
    93
melunko@38
    94
AC_SUBST(GNOME_VFS_CFLAGS)
melunko@38
    95
AC_SUBST(GNOME_VFS_LIBS)
melunko@38
    96
melunko@38
    97
dnl Check for gmyth-0.1
melunko@38
    98
PKG_CHECK_MODULES(LIBGMYTH,
melunko@38
    99
  gmyth-0.1,
melunko@38
   100
  have_libgmyth=yes,
melunko@38
   101
  have_libgmyth=no)
melunko@38
   102
melunko@38
   103
if test x"$have_libgmyth" = "xno"; then
melunko@38
   104
  AC_MSG_ERROR(gmyth-0.1 not found)        
melunko@38
   105
fi
melunko@38
   106
melunko@38
   107
AC_SUBST(LIBGMYTH_CFLAGS)
melunko@38
   108
AC_SUBST(LIBGMYTH_LIBS)
melunko@38
   109
melunko@38
   110
AC_OUTPUT([
melunko@38
   111
Makefile
melunko@38
   112
modules/Makefile
melunko@38
   113
common/Makefile
melunko@38
   114
m4/Makefile
melunko@38
   115
])