gmyth-stream/gmemcoder/configure.ac
author renatofilho
Thu May 03 14:39:25 2007 +0100 (2007-05-03)
branchtrunk
changeset 622 4691abcf4f45
parent 584 170e18a7ca71
child 762 1be4b68bfb0e
permissions -rw-r--r--
[svn r628] fixed samples makefile
     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.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 gst-base #########################################################
    64 ###############################################################################
    65 PKG_CHECK_MODULES(GST, [gstreamer-base-0.10])
    66 AC_SUBST(GST_CFLAGS)
    67 AC_SUBST(GST_LIBS)
    68 
    69 AC_SUBST(CFLAGS)
    70 AC_SUBST(LDFLAGS)
    71 AC_SUBST(LIBS)
    72 
    73 AC_OUTPUT([
    74 Makefile
    75 src/Makefile
    76 tests/Makefile
    77 ])
    78 
    79 if test "x$enable_debug" != "xno"; then
    80     AC_MSG_NOTICE([Debug: Enabled])
    81 else
    82     AC_MSG_NOTICE([Debug: Disabled])
    83 fi          
    84