Home | History | Annotate | Download | only in mix_vbp
      1 AC_INIT("", "", [linda.s.cline (a] intel.com])
      2 
      3 AC_CONFIG_MACRO_DIR(m4)
      4 
      5 AS_MIX_VERSION(mixvbp, MIXVBP, 0, 1, 15)
      6 
      7 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
      8 AM_MAINTAINER_MODE
      9 
     10 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
     11 
     12 dnl make aclocal work in maintainer mode
     13 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
     14 
     15 AM_CONFIG_HEADER(config.h)
     16 
     17 dnl check for tools
     18 AC_PROG_CC
     19 AC_PROG_LIBTOOL
     20 
     21 MIX_CFLAGS="-Wall -Werror"
     22 
     23 dnl decide on error flags
     24 dnl AS_COMPILER_FLAG(-Wall, MIX_ERROR="$MIX_ERROR -Wall", MIX_ERROR="$MIX_ERROR")
     25 dnl AS_COMPILER_FLAG(-Werror,MIX_ERROR="$MIX_ERROR -Werror",MIX_ERROR="$MIX_ERROR")
     26 
     27 dnl Check for pkgconfig first
     28 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
     29 
     30 dnl Give error and exit if we don't have pkgconfig
     31 if test "x$HAVE_PKGCONFIG" = "xno"; then
     32   AC_MSG_ERROR(you need to have pkgconfig installed !)
     33 fi
     34 
     35 dnl GLib
     36 dnl FIXME: need to align with moblin glib version
     37 dnl FIXME: currently using an earlier version so it can be built on dev box.
     38 GLIB_REQ=2.16
     39 
     40 dnl Check for glib2 without extra fat, useful for the unversioned tool frontends
     41 dnl PKG_CHECK_MODULES(GLIB_ONLY, glib-2.0 >= $GLIB_REQ,HAVE_GLIB=yes,HAVE_GLIB=no)
     42 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQ,HAVE_GLIB=yes,HAVE_GLIB=no)
     43 if test "x$HAVE_GLIB" = "xno"; then
     44   AC_MSG_ERROR(You need glib development packages installed !)
     45 fi
     46 
     47 PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= $GLIB_REQ,HAVE_GOBJECT=yes,HAVE_GOBJECT=no)
     48 if test "x$HAVE_GOBJECT" = "xno"; then
     49   AC_MSG_ERROR(You need glib development packages installed !)
     50 fi
     51 
     52 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQ,HAVE_GTHREAD=yes,HAVE_GTHREAD=no)
     53 if test "x$HAVE_GTHREAD" = "xno"; then
     54   AC_MSG_ERROR(You need glib development packages installed !)
     55 fi
     56 
     57 dnl Check for documentation xrefs
     58 dnl GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
     59 dnl AC_SUBST(GLIB_PREFIX)
     60 
     61 AC_SUBST(GLIB_CFLAGS)
     62 AC_SUBST(GLIB_LIBS)
     63 AC_SUBST(GOBJECT_CFLAGS)
     64 AC_SUBST(GOBJECT_LIBS)
     65 AC_SUBST(MIX_CFLAGS)
     66 AC_SUBST(GTHREAD_CFLAGS)
     67 AC_SUBST(GTHREAD_LIBS)
     68 
     69 AC_CONFIG_FILES([
     70 mixvbp.pc
     71 Makefile
     72 viddec_fw/fw/parser/Makefile
     73 ])
     74 
     75 AC_OUTPUT
     76 
     77 
     78