summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-20 17:45:25 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-03-01 12:59:05 +0100
commit025d0bd58019051ef269c8b80147ba38964308d8 (patch)
treead81c3c63429939532613d27e10fca6a629b5e13 /configure.ac
parentafade2bc00641f0889e615d91a6882972b7e69b2 (diff)
mingw: add autotools build system
This makes building with mingw much more convenient.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac87
1 files changed, 87 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..77d5c25
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,87 @@
+# Copyright (C) 2010 Richard Hughes <richard@hughsie.com>
+# Copyright (C) 2011 Christophe Fergeau <cfergeau@redhat.com>
+AC_PREREQ(2.63)
+
+m4_define([vdagent_major_version], [0])
+m4_define([vdagent_minor_version], [0])
+m4_define([vdagent_micro_version], [1])
+m4_define([vdagent_version],
+ [vdagent_major_version.vdagent_minor_version.vdagent_micro_version])
+
+AC_INIT([vdagent-win],[vdagent_version])
+AC_CONFIG_SRCDIR([vdagent])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE([1.11 subdir-objects no-dist-gzip dist-xz tar-ustar])
+
+AM_SILENT_RULES([yes])
+
+# Check for programs
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_CC_C_O
+AC_PROG_INSTALL
+
+dnl ---------------------------------------------------------------------------
+dnl - Extra verbose warning switches
+dnl ---------------------------------------------------------------------------
+
+if test "$GCC" = "yes"; then
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wall"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wcast-align -Wno-uninitialized"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-declarations"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wpointer-arith"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wcast-align"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wwrite-strings"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Winit-self"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wreturn-type"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wformat-nonliteral"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wformat-security"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-include-dirs"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-format-attribute"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wclobbered"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wempty-body"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wignored-qualifiers"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wsign-compare"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wtype-limits"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wuninitialized"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Waggregate-return"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wdeclaration-after-statement"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wshadow"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wno-strict-aliasing"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Winline"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-parameter-type"
+ WARNINGFLAGS_C="$WARNINGFLAGS_C -Woverride-init"
+else
+ WARNINGFLAGS_C=""
+fi
+AC_SUBST(WARNINGFLAGS_C)
+
+dnl ---------------------------------------------------------------------------
+dnl - Check library dependencies
+dnl ---------------------------------------------------------------------------
+
+PKG_CHECK_MODULES(SPICE_PROTOCOL, [spice-protocol])
+PKG_CHECK_MODULES(CXIMAGE, [cximage])
+
+dnl ---------------------------------------------------------------------------
+dnl - Makefiles, etc.
+dnl ---------------------------------------------------------------------------
+AC_CONFIG_FILES([
+Makefile
+])
+AC_OUTPUT
+
+dnl ==========================================================================
+echo "
+ vdagent-win $VERSION
+ ================
+
+ prefix: ${prefix}
+ datadir: ${datadir}
+ compiler: ${CXX}
+ cxxflags: ${CXXFLAGS}
+ cppflags: ${CPPFLAGS}
+"