From 26526b13c59bd64f2c06effb48b35c7c72b9bf09 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 8 May 2016 10:16:12 +0200 Subject: [PATCH] Properly check for windres Use the standard way to check for the resource compiler, as e.g. libtool does it: AC_CHECK_TOOL does already provide some cross compiling magic, and we do also get an error now at configure time if windres is not found. --- configure.ac | 8 ++++++-- src/Makefile.am | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 7b8b742a63..0b7a64bad4 100644 --- a/configure.ac +++ b/configure.ac @@ -117,8 +117,6 @@ AC_CHECK_LIB(psapi, main, [LIBPSAPI=-lpsapi]) AC_SUBST(LIBPSAPI) AC_CHECK_LIB(gdi32, main) AC_CHECK_LIB(ole32, main) -test x"$WINDRES" = x && WINDRES=windres -AC_ARG_VAR(WINDRES, [windows resource compiler command]) LYX_USE_INCLUDED_BOOST LYX_USE_INCLUDED_MYTHES @@ -237,6 +235,12 @@ lyx_win_res=false; case ${host} in *mingw*|*cygwin*) lyx_win_res=true;; esac +if test "x$lyx_win_res" = "xtrue"; then + AC_CHECK_TOOL(RC, windres,) + if test -z "$RC"; then + AC_ERROR([Could not find a resource compiler]) + fi +fi AM_CONDITIONAL(LYX_WIN_RESOURCE, $lyx_win_res) LYX_SET_VERSION_INFO diff --git a/src/Makefile.am b/src/Makefile.am index 57f66d9070..90fb3e65af 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,7 +42,7 @@ lyx_LDADD = \ if LYX_WIN_RESOURCE .rc.o: cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico . - $(WINDRES) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@ + $(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@ endif if INSTALL_MACOSX