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