gmyth-stream/gmencoder/configure.ac
branchtrunk
changeset 872 c91d9f4d142f
parent 786 a4529d0f8ede
child 930 bb5d61b14d41
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gmyth-stream/gmencoder/configure.ac	Thu Oct 25 18:43:23 2007 +0100
     1.3 @@ -0,0 +1,93 @@
     1.4 +#                                               -*- Autoconf -*-
     1.5 +# Process this file with autoconf to produce a configure script.
     1.6 +
     1.7 +AC_PREREQ(2.50)
     1.8 +
     1.9 +AC_INIT([gmemcoder],[0.1])
    1.10 +
    1.11 +AC_CONFIG_MACRO_DIR([m4])
    1.12 +AC_CONFIG_HEADER(config.h)
    1.13 +
    1.14 +AS_VERSION(gmemcoder, GMEMCODER, 0, 1, 0, 0, GMEMCODER_SVN="no", GMEMCODER_SVN="yes")
    1.15 +GMEMCODER_MAJORMINOR=$GMEMCODER_VERSION.$GMEMCODER_MINOR_VERSION
    1.16 +AC_SUBST(GMEMCODER_MAJORMINOR)
    1.17 +
    1.18 +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    1.19 +AM_MAINTAINER_MODE
    1.20 +dnl make aclocal work in maintainer mode
    1.21 +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    1.22 +
    1.23 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    1.24 +
    1.25 +# Checks for programs.
    1.26 +# check for tools
    1.27 +# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    1.28 +CFLAGS="$CFLAGS -Wall"
    1.29 +AC_PROG_CC
    1.30 +AC_PROG_LIBTOOL
    1.31 +
    1.32 +# Checks for libraries.
    1.33 +
    1.34 +# Checks for header files.
    1.35 +AC_HEADER_STDC
    1.36 +
    1.37 +#Test if --disable-debug given
    1.38 +AC_ARG_ENABLE(debug,
    1.39 +	AC_HELP_STRING([--disable-debug], [enable debugging mode]))
    1.40 +if test x"$enable_debug" != xno; then
    1.41 +    CFLAGS="$CFLAGS -g -DMYTH_STREAM_USE_DEBUG"
    1.42 +else
    1.43 +    CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
    1.44 +fi          
    1.45 +
    1.46 +
    1.47 +# Checks required packages ####################################################
    1.48 +###############################################################################
    1.49 +
    1.50 +## Check for pkgconfig ########################################################
    1.51 +###############################################################################
    1.52 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    1.53 +if test "x$HAVE_PKGCONFIG" = "xno"; then
    1.54 +  AC_MSG_ERROR(you need to have pkgconfig installed !)
    1.55 +fi
    1.56 +
    1.57 +## Check for Glib2.0 ##########################################################
    1.58 +###############################################################################
    1.59 +PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
    1.60 +if test "x$HAVE_GLIB" = "xno"; then
    1.61 +  AC_MSG_ERROR(you need glib-2.0 installed)
    1.62 +fi
    1.63 +AC_SUBST(GLIB_CFLAGS)
    1.64 +AC_SUBST(GLIB_LIBS)
    1.65 +
    1.66 +## Check for GnomeVFS ##########################################################
    1.67 +###############################################################################
    1.68 +PKG_CHECK_MODULES(GVFS, gnome-vfs-2.0, HAVE_GVFS=yes,HAVE_GVFS=no)
    1.69 +if test "x$HAVE_GVFS" = "xno"; then
    1.70 +  AC_MSG_ERROR(you need gnome-vfs-2.0 installed)
    1.71 +fi
    1.72 +AC_SUBST(GVFS_CFLAGS)
    1.73 +AC_SUBST(GVFS_LIBS)
    1.74 +
    1.75 +
    1.76 +## Check for gst-base #########################################################
    1.77 +###############################################################################
    1.78 +PKG_CHECK_MODULES(GST, [gstreamer-base-0.10])
    1.79 +AC_SUBST(GST_CFLAGS)
    1.80 +AC_SUBST(GST_LIBS)
    1.81 +
    1.82 +AC_SUBST(CFLAGS)
    1.83 +AC_SUBST(LDFLAGS)
    1.84 +AC_SUBST(LIBS)
    1.85 +
    1.86 +AC_OUTPUT([
    1.87 +Makefile
    1.88 +src/Makefile
    1.89 +])
    1.90 +
    1.91 +if test "x$enable_debug" != "xno"; then
    1.92 +    AC_MSG_NOTICE([Debug: Enabled])
    1.93 +else
    1.94 +    AC_MSG_NOTICE([Debug: Disabled])
    1.95 +fi          
    1.96 +