summaryrefslogtreecommitdiff
path: root/m4/evil_windows.m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-11 16:04:21 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-11 16:04:21 +0000
commit59a9dfd11860888a35e96dfe51af63cea5cecfe1 (patch)
tree5577297b8bb6e1b299987c45eb0c0fa9a5669b0b /m4/evil_windows.m4
parent0ca69d1f2d2f378223bed712c9cdcd7e6679e305 (diff)
merge: add infra for evil
SVN revision: 76463
Diffstat (limited to 'm4/evil_windows.m4')
-rw-r--r--m4/evil_windows.m459
1 files changed, 59 insertions, 0 deletions
diff --git a/m4/evil_windows.m4 b/m4/evil_windows.m4
new file mode 100644
index 0000000000..be79b8296b
--- /dev/null
+++ b/m4/evil_windows.m4
@@ -0,0 +1,59 @@
1dnl Copyright (C) 2011 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that select the Windows version (XP (default), Vista, 7)
5
6dnl Usage: EFL_SELECT_WINDOWS_VERSION()
7dnl Update CPPFLAGS accordingly
8
9AC_DEFUN([EFL_SELECT_WINDOWS_VERSION],
10[
11
12dnl configure option
13
14AC_ARG_WITH([windows-version],
15 [AC_HELP_STRING([--with-windows-version], [select the target Windows version (xp, vista, win7 or ce) @<:@default=xp@:>@])],
16 [
17 if test "x${with_windows_version}" = "xvista" ; then
18 _winver="vista"
19 else
20 if test "x${with_windows_version}" = "xwin7" ; then
21 _winver="win7"
22 else
23 if test "x${with_windows_version}" = "ce" ; then
24 _winver="ce"
25 else
26 _winver="xp"
27 fi
28 fi
29 fi
30 ],
31 [_winver="xp"])
32
33AC_MSG_CHECKING([which Windows version to target])
34AC_MSG_RESULT([${_winver}])
35
36case "${_winver}" in
37 ce)
38 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WCE=0x0420"
39 _efl_windows_version="Windows CE"
40 ;;
41 vista)
42 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0600"
43 _efl_windows_version="Windows Vista"
44 ;;
45 win7)
46 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0601"
47 _efl_windows_version="Windows 7"
48 ;;
49 *)
50 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0501"
51 _efl_windows_version="Windows XP"
52 ;;
53esac
54
55CPPFLAGS="${CPPFLAGS} ${EFL_WINDOWS_VERSION_CFLAGS}"
56AC_SUBST([EFL_WINDOWS_VERSION_CFLAGS])
57AC_SUBST([_efl_windows_version])
58
59])