commit 26524bf56324364ceb1f9fad6e1efec55315d73d
Author: Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Thu Sep 3 07:44:56 2015 +0200
Commit: Fabian Greffrath <fabian@greffrath.com>
CommitDate: Thu Sep 3 07:44:56 2015 +0200
configure: Check for windres only if building for windows
This is based on a patch proposed for libvirt:
https://www.redhat.com/archives/libvir-list/2010-February/msg00863.html
Fixes #604
---
configure.ac | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index e281b114..b2742d75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,7 +103,15 @@ AC_SDL_MAIN_WORKAROUND([
AC_CHECK_LIB(amd64, amd64_iopl)
])
-AC_CHECK_TOOL(WINDRES, windres, )
+case $host in
+ *cygwin* | *mingw* )
+ AC_CHECK_TOOL(WINDRES, windres, )
+ ;;
+ *)
+ WINDRES=
+ ;;
+esac
+
AC_CHECK_TOOL(STRIP, strip, )
AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "")