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