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.
AC_SUBST(LIBPSAPI)
AC_CHECK_LIB(gdi32, main)
AC_CHECK_LIB(ole32, main)
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
LYX_USE_INCLUDED_BOOST
LYX_USE_INCLUDED_MYTHES
case ${host} in
*mingw*|*cygwin*) lyx_win_res=true;;
esac
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
AM_CONDITIONAL(LYX_WIN_RESOURCE, $lyx_win_res)
LYX_SET_VERSION_INFO
if LYX_WIN_RESOURCE
.rc.o:
cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
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 $@