shithub: choc

Download patch

ref: 26524bf56324364ceb1f9fad6e1efec55315d73d
parent: 90d42a512c67101167a01dc40e56eb42753a6d89
author: Fabian Greffrath <fabian@greffrath.com>
date: Thu Sep 3 03:44:56 EDT 2015

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

--- a/configure.ac
+++ b/configure.ac
@@ -103,7 +103,15 @@
     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" != "")