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
This commit is contained in:
Fabian Greffrath 2015-09-03 07:44:56 +02:00
parent 90d42a512c
commit 26524bf563

View file

@ -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" != "")