gmyth-stream/gmencoder/configure.ac
author renatofilho
Tue Feb 26 14:10:22 2008 +0000 (2008-02-26)
branchtrunk
changeset 930 bb5d61b14d41
parent 847 3c18c36245e7
permissions -rw-r--r--
[svn r939] - release 26/02/2008 - 0.7.1
     1 #                                               -*- Autoconf -*-
     2 # Process this file with autoconf to produce a configure script.
     3 
     4 AC_PREREQ(2.50)
     5 
     6 AC_INIT([gmemcoder],[0.7.1])
     7 
     8 AC_CONFIG_MACRO_DIR([m4])
     9 AC_CONFIG_HEADER(config.h)
    10 
    11 AS_VERSION(gmemcoder, GMEMCODER, 0, 1, 0, 0, GMEMCODER_SVN="no", GMEMCODER_SVN="yes")
    12 GMEMCODER_MAJORMINOR=$GMEMCODER_VERSION.$GMEMCODER_MINOR_VERSION
    13 AC_SUBST(GMEMCODER_MAJORMINOR)
    14 
    15 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    16 AM_MAINTAINER_MODE
    17 dnl make aclocal work in maintainer mode
    18 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    19 
    20 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    21 
    22 # Checks for programs.
    23 # check for tools
    24 # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    25 CFLAGS="$CFLAGS -Wall"
    26 AC_PROG_CC
    27 AC_PROG_LIBTOOL
    28 
    29 # Checks for libraries.
    30 
    31 # Checks for header files.
    32 AC_HEADER_STDC
    33 
    34 #Test if --disable-debug given
    35 AC_ARG_ENABLE(debug,
    36 	AC_HELP_STRING([--disable-debug], [enable debugging mode]))
    37 if test x"$enable_debug" != xno; then
    38     CFLAGS="$CFLAGS -g -DMYTH_STREAM_USE_DEBUG"
    39 else
    40     CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
    41 fi          
    42 
    43 
    44 # Checks required packages ####################################################
    45 ###############################################################################
    46 
    47 ## Check for pkgconfig ########################################################
    48 ###############################################################################
    49 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    50 if test "x$HAVE_PKGCONFIG" = "xno"; then
    51   AC_MSG_ERROR(you need to have pkgconfig installed !)
    52 fi
    53 
    54 ## Check for Glib2.0 ##########################################################
    55 ###############################################################################
    56 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
    57 if test "x$HAVE_GLIB" = "xno"; then
    58   AC_MSG_ERROR(you need glib-2.0 installed)
    59 fi
    60 AC_SUBST(GLIB_CFLAGS)
    61 AC_SUBST(GLIB_LIBS)
    62 
    63 ## Check for GnomeVFS ##########################################################
    64 ###############################################################################
    65 PKG_CHECK_MODULES(GVFS, gnome-vfs-2.0, HAVE_GVFS=yes,HAVE_GVFS=no)
    66 if test "x$HAVE_GVFS" = "xno"; then
    67   AC_MSG_ERROR(you need gnome-vfs-2.0 installed)
    68 fi
    69 AC_SUBST(GVFS_CFLAGS)
    70 AC_SUBST(GVFS_LIBS)
    71 
    72 
    73 ## Check for gst-base #########################################################
    74 ###############################################################################
    75 PKG_CHECK_MODULES(GST, [gstreamer-base-0.10])
    76 AC_SUBST(GST_CFLAGS)
    77 AC_SUBST(GST_LIBS)
    78 
    79 AC_SUBST(CFLAGS)
    80 AC_SUBST(LDFLAGS)
    81 AC_SUBST(LIBS)
    82 
    83 AC_OUTPUT([
    84 Makefile
    85 src/Makefile
    86 ])
    87 
    88 if test "x$enable_debug" != "xno"; then
    89     AC_MSG_NOTICE([Debug: Enabled])
    90 else
    91     AC_MSG_NOTICE([Debug: Disabled])
    92 fi          
    93