2008-03-05 18:24:16 -05:00
2011-02-21 15:27:04 +00:00
AC_INIT(virt-viewer, 0.3.1)
2011-07-01 16:12:20 +01:00
AC_CONFIG_SRCDIR(src/virt-viewer-main.c)
2008-03-05 18:24:16 -05:00
AM_CONFIG_HEADER(config.h)
dnl Make automake keep quiet about wildcards & other GNUmake-isms
AM_INIT_AUTOMAKE([-Wno-portability])
AC_CANONICAL_HOST
2007-07-20 15:26:08 -04:00
2010-01-12 12:43:01 +00:00
# Use the silent-rules feature when possible.
m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
AM_SILENT_RULES([yes])
2011-07-01 13:41:54 +01:00
GLIB2_REQUIRED=2.12.0
2011-07-01 13:11:41 +01:00
LIBXML2_REQUIRED="2.6.0"
LIBVIRT_REQUIRED="0.6.0"
2011-07-01 13:41:54 +01:00
GTK2_REQUIRED="2.12.0"
2011-07-01 13:11:41 +01:00
GTK_VNC_REQUIRED="0.3.8"
SPICE_GTK_REQUIRED="0.6"
2007-07-20 15:26:08 -04:00
AC_PROG_CC
2008-01-25 16:27:04 -05:00
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
2007-07-20 15:26:08 -04:00
2008-10-10 12:37:23 +01:00
AC_CONFIG_LIBOBJ_DIR([src])
2008-03-05 18:24:16 -05:00
AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions])
2007-07-20 15:26:08 -04:00
VIRT_VIEWER_COMPILE_WARNINGS(maximum)
2010-01-11 16:01:20 +00:00
GETTEXT_PACKAGE=virt-viewer
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT
2011-07-01 13:41:54 +01:00
PKG_CHECK_MODULES(GLIB2, gmodule-export-2.0 >= $GLIB2_REQUIRED)
2011-07-01 13:11:41 +01:00
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
PKG_CHECK_MODULES(LIBVIRT, libvirt >= $LIBVIRT_REQUIRED)
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= $GTK2_REQUIRED)
PKG_CHECK_MODULES(GTKVNC, gtk-vnc-1.0 >= $GTK_VNC_REQUIRED)
2010-12-10 12:22:48 +01:00
AC_ARG_WITH([spice-gtk],
AS_HELP_STRING([--without-spice-gtk], [Ignore presence of spice-gtk and disable it]))
AS_IF([test "x$with_spice_gtk" != "xno"],
2011-07-01 13:11:41 +01:00
[PKG_CHECK_MODULES(SPICEGTK, spice-client-gtk-2.0 >= $SPICE_GTK_REQUIRED, [have_spice_gtk=yes], [have_spice_gtk=no])],
2010-12-10 12:22:48 +01:00
[have_spice_gtk=no])
AS_IF([test "x$have_spice_gtk" = "xyes"],
2011-02-21 14:30:12 +00:00
[AC_DEFINE([HAVE_SPICE_GTK], 1, [Have spice-gtk?])],
2010-12-10 12:22:48 +01:00
[AS_IF([test "x$with_spice_gtk" = "xyes"],
[AC_MSG_ERROR([spice-gtk requested but not found])
])
])
AM_CONDITIONAL([HAVE_SPICE_GTK], [test "x$have_spice_gtk" = "xyes"])
2007-07-20 15:26:08 -04:00
2008-10-10 12:37:23 +01:00
dnl Decide if this platform can support the SSH tunnel feature.
AC_CHECK_HEADERS([sys/socket.h sys/un.h windows.h])
AC_CHECK_FUNCS([fork socketpair])
2008-01-25 16:27:04 -05:00
dnl --enable-plugin to enable the browser plugin.
NSPR_REQUIRED=4.0.0
2008-03-08 14:04:10 -05:00
FIREFOX_PLUGIN_REQUIRED=1.5.0
2008-03-09 16:36:17 -04:00
MOZILLA_PLUGIN_REQUIRED=1.8
2008-01-25 16:27:04 -05:00
AC_ARG_ENABLE(plugin,
[ --enable-plugin=[no/yes] enable browser plugin [default=no]],,
enable_plugin=no)
if test "x$enable_plugin" = "xyes"; then
dnl Check for Netscape Portable Runtime development package.
PKG_CHECK_MODULES(NSPR, nspr >= $NSPR_REQUIRED)
dnl Check for Firefox plugin package (also includes NSPR cflags/libs).
PKG_CHECK_MODULES(FIREFOX_PLUGIN,
2008-03-09 16:36:17 -04:00
firefox-plugin >= $FIREFOX_PLUGIN_REQUIRED, ,[
PKG_CHECK_MODULES(MOZILLA_PLUGIN,
mozilla-plugin >= $MOZILLA_PLUGIN_REQUIRED)
FIREFOX_PLUGIN_CFLAGS="$MOZILLA_PLUGIN_CFLAGS"
FIREFOX_PLUGIN_LIBS="$MOZILLA_PLUGIN_LIBS"
])
2008-01-25 16:27:04 -05:00
AC_SUBST(FIREFOX_PLUGIN_CFLAGS)
AC_SUBST(FIREFOX_PLUGIN_LIBS)
fi
AM_CONDITIONAL(ENABLE_PLUGIN, [test "x$enable_plugin" = "xyes"])
2007-07-20 15:26:08 -04:00
AC_OUTPUT(Makefile
src/Makefile
2007-07-20 15:59:19 -04:00
man/Makefile
2010-01-11 16:01:20 +00:00
po/Makefile.in
2008-01-25 16:27:04 -05:00
plugin/Makefile
2008-11-28 07:24:56 -05:00
virt-viewer.spec
mingw32-virt-viewer.spec)