summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2014-02-17 13:00:14 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2014-06-19 15:27:31 +0200
commit8588daa1e0530fd6517fd0b8edb01018c7b77805 (patch)
tree9b6d900a9b273388d80b4cd20eeda9057ee20d34 /configure.ac
parent4171d11bb69af84d45aee537a113eb4eebd09aa9 (diff)
Learn to build spice-vdagent MSI installer
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 12329b4..7f6511d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,11 +9,30 @@ AC_CONFIG_SRCDIR([vdagent])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
+AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects no-dist-gzip dist-xz tar-ustar])
AM_SILENT_RULES([yes])
+AC_ARG_WITH([buildid],
+AS_HELP_STRING([--with-buildid=id], [Set additional build version details]))
+AC_DEFINE_UNQUOTED([BUILDID], "$with_buildid", [Build version details])
+if test "x$with_buildid" != x; then
+ AC_SUBST([BUILDID], "-$with_buildid")
+fi
+
+major=`echo $PACKAGE_VERSION | cut -d. -f1`
+minor=`echo $PACKAGE_VERSION | cut -d. -f2`
+micro=`echo $PACKAGE_VERSION | cut -d. -f3`
+buildid=`echo $with_buildid | cut -d. -f1`
+if test "x$buildid" = x; then
+ buildid=0
+fi
+build=`expr $micro \* 256 + $buildid`
+WINDOWS_PRODUCTVERSION="$major.$minor.$build"
+AC_SUBST([WINDOWS_PRODUCTVERSION])
+
# Check for programs
AC_PROG_CC
AC_PROG_CXX
@@ -21,6 +40,16 @@ AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_CHECK_TOOL(WINDRES, [windres])
+case "$host" in
+amd64*|x86_64*)
+ WIXL_ARCH="x64"
+;;
+*)
+ WIXL_ARCH="x86"
+;;
+esac
+AC_SUBST(WIXL_ARCH)
+
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [Enable debugging]))
@@ -75,6 +104,7 @@ AC_CONFIG_SUBDIRS([spice-protocol])
AC_CONFIG_FILES([
Makefile
mingw-spice-vdagent.spec
+spice-vdagent.wxs
])
AC_OUTPUT