libgnomevfs2-mythtv/configure.ac
author rosfran
Wed Nov 22 00:16:33 2006 +0000 (2006-11-22)
branchtrunk
changeset 98 d0f379fc4173
child 396 ab0098a886e3
permissions -rwxr-xr-x
[svn r99] Removed GstAdapter, changed it to GByteArray.
     1 AC_INIT(libgnomevfs2-mythtv, 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-mythtv, LIBGNOMEVFS2_MYTHTV, 0, 1, 0, 1, LIBGNOMEVFS2_MYTHTV_CVS="no", LIBGNOMEVFS2_MYTHTV_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-mythtv])
    92 fi
    93 
    94 AC_SUBST(GNOME_VFS_CFLAGS)
    95 AC_SUBST(GNOME_VFS_LIBS)
    96 
    97 dnl Check for gmyth-0.1
    98 PKG_CHECK_MODULES(LIBGMYTH,
    99   gmyth-0.1,
   100   have_libgmyth=yes,
   101   have_libgmyth=no)
   102 
   103 if test x"$have_libgmyth" = "xno"; then
   104   AC_MSG_ERROR(gmyth-0.1 not found)        
   105 fi
   106 
   107 AC_SUBST(LIBGMYTH_CFLAGS)
   108 AC_SUBST(LIBGMYTH_LIBS)
   109 
   110 AC_OUTPUT([
   111 Makefile
   112 modules/Makefile
   113 common/Makefile
   114 m4/Makefile
   115 ])