1AC_INIT("", "", [linda.s.cline@intel.com]) 2 3AC_CONFIG_MACRO_DIR(m4) 4 5AS_MIX_VERSION(mixvideo, MIXVIDEO, 0, 1, 14) 6 7dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode 8AM_MAINTAINER_MODE 9 10AM_INIT_AUTOMAKE($PACKAGE, $VERSION) 11#AM_INIT_AUTOMAKE([-Wall -Werror foreign]) 12 13dnl make aclocal work in maintainer mode 14AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") 15 16AM_CONFIG_HEADER(config.h) 17 18dnl check for tools 19AC_PROG_CC 20AC_PROG_LIBTOOL 21 22#MIX_CFLAGS="-Wall -Werror" 23MIX_CFLAGS="-Wall" 24 25AC_ARG_ENABLE(mixlog, 26 AS_HELP_STRING([--enable-mixlog], 27 [Enable mixlog (default=no)]), 28 [mixlog_enabled=$enableval], 29 [mixlog_enabled=no]) 30AC_MSG_RESULT($mixlog_enabled) 31AM_CONDITIONAL(MIXLOG_ENABLED, test "$mixlog_enabled" = "yes") 32 33 34dnl decide on error flags 35dnl AS_COMPILER_FLAG(-Wall, MIX_ERROR="$MIX_ERROR -Wall", MIX_ERROR="$MIX_ERROR") 36dnl AS_COMPILER_FLAG(-Werror,MIX_ERROR="$MIX_ERROR -Werror",MIX_ERROR="$MIX_ERROR") 37 38dnl Check for pkgconfig first 39AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) 40 41dnl Give error and exit if we don't have pkgconfig 42if test "x$HAVE_PKGCONFIG" = "xno"; then 43 AC_MSG_ERROR(you need to have pkgconfig installed !) 44fi 45 46dnl GLib 47dnl FIXME: need to align with moblin glib version 48dnl FIXME: currently using an earlier version so it can be built on dev box. 49GLIB_REQ=2.16 50 51dnl Check for glib2 without extra fat, useful for the unversioned tool frontends 52dnl PKG_CHECK_MODULES(GLIB_ONLY, glib-2.0 >= $GLIB_REQ,HAVE_GLIB=yes,HAVE_GLIB=no) 53PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQ,HAVE_GLIB=yes,HAVE_GLIB=no) 54if test "x$HAVE_GLIB" = "xno"; then 55 AC_MSG_ERROR(You need glib development packages installed !) 56fi 57 58PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= $GLIB_REQ,HAVE_GOBJECT=yes,HAVE_GOBJECT=no) 59if test "x$HAVE_GOBJECT" = "xno"; then 60 AC_MSG_ERROR(You need glib development packages installed !) 61fi 62 63PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQ,HAVE_GTHREAD=yes,HAVE_GTHREAD=no) 64if test "x$HAVE_GTHREAD" = "xno"; then 65 AC_MSG_ERROR(You need glib development packages installed !) 66fi 67 68LIBVA_REQ=0.31 69PKG_CHECK_MODULES(LIBVA, libva >= $LIBVA_REQ,HAVE_LIBVA=yes,HAVE_LIBVA=no) 70if test "x$HAVE_LIBVA" = "xno"; then 71 AC_MSG_ERROR(You need libva development package installed !) 72fi 73#LIBVA_CFLAGS="-I/usr/local/include" 74#LIBVA_LIBS="-lva" 75 76 77LIBVA_X11_REQ=0.31 78PKG_CHECK_MODULES(LIBVA_X11, libva-x11 >= $LIBVA_X11_REQ,HAVE_LIBVA_X11=yes,HAVE_LIBVA_X11=no) 79if test "x$HAVE_LIBVA_X11" = "xno"; then 80 AC_MSG_ERROR(You need libva development package installed !) 81fi 82#LIBVA_X11_CFLAGS="-I/usr/local/include" 83#LIBVA_X11LIBS="-lva-x11" 84 85 86MIXCOMMON_REQ=0.1 87PKG_CHECK_MODULES(MIXCOMMON, mixcommon >= $MIXCOMMON_REQ, HAVE_MIXCOMMON=yes, HAVE_MIXCOMMON=no) 88if test "x$HAVE_MIXCOMMON" = "xno"; then 89 AC_MSG_ERROR(You need mixcommon development package installed !) 90fi 91 92MIXVBP_REQ=0.1 93PKG_CHECK_MODULES(MIXVBP, mixvbp >= $MIXVBP_REQ, HAVE_MIXVBP=yes, HAVE_MIXVBP=no) 94if test "x$HAVE_MIXVBP" = "xno"; then 95 AC_MSG_ERROR(You need mixvbp development package installed !) 96fi 97 98dnl Check for documentation xrefs 99dnl GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`" 100dnl AC_SUBST(GLIB_PREFIX) 101 102AC_SUBST(GLIB_CFLAGS) 103AC_SUBST(GLIB_LIBS) 104AC_SUBST(GOBJECT_CFLAGS) 105AC_SUBST(GOBJECT_LIBS) 106AC_SUBST(MIX_CFLAGS) 107AC_SUBST(GTHREAD_CFLAGS) 108AC_SUBST(GTHREAD_LIBS) 109AC_SUBST(LIBVA_CFLAGS) 110AC_SUBST(LIBVA_LIBS) 111AC_SUBST(MIXCOMMON_CFLAGS) 112AC_SUBST(MIXCOMMON_LIBS) 113AC_SUBST(MIXVBP_CFLAGS) 114AC_SUBST(MIXVBP_LIBS) 115 116 117#check for gtk-doc 118#GTK_DOC_CHECK(1.9) 119 120AC_CONFIG_FILES([ 121mixvideo.pc 122mixvideoint.pc 123Makefile 124src/Makefile 125]) 126 127dnl Additional Makefiles if we are building document with gtkdoc. 128dnl Un-comment this section to enable building of documentation. 129dnl AC_CONFIG_FILES( 130dnl docs/Makefile 131dnl docs/reference/Makefile 132#dnl docs/reference/MixVideo/Makefile 133dnl ) 134 135AC_OUTPUT 136 137 138