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