use WINDRES instead of RC to compile rc file
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Tue, 9 Jun 2009 11:46:11 +0000 (21:46 +1000)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 1 Dec 2009 07:38:03 +0000 (08:38 +0100)
This is the way used by GTK+ and other packages. I don't know much about "RC" though.
(cherry picked from commit d5b993ebc1411b15e4563d05fbd92cf8b29cbb4c)

configure.in
dbus/Makefile.am

index fabb6d3..0fd11ec 100644 (file)
@@ -89,6 +89,10 @@ if test "$dbus_win" = yes; then
       *-rc*)  BUILD_FILEVERSION="${BUILD_FILEVERSION}1" ;;
       *)      BUILD_FILEVERSION="${BUILD_FILEVERSION}2" ;;
     esac
+    AC_CHECK_TOOL(WINDRES, windres, no)
+    if test "$WINDRES" = no; then
+      AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
+    fi
 else
     AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system])
 fi
index 4dc53e3..5f8d703 100644 (file)
@@ -15,14 +15,10 @@ lib_LTLIBRARIES=libdbus-1.la
 # Deal with W32 .def and version-info.rc stuff
 #
 if DBUS_WIN
-LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
 SUFFIXES = rc
 
 .rc.o:
-       $(LTRCCOMPILE) -i $< -o $@
+       $(WINDRES) $< -o $@
 
 dbus_res = versioninfo.o
 dbus_res_ldflag = -Wl,$(dbus_res)