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