--- gettext-0.17/gettext-runtime/intl/Makefile.in	2007-11-04 21:21:12.000000000 +0000
+++ gettext/gettext-runtime/intl/Makefile.in	2008-03-07 18:14:53.000000000 +0000
@@ -280,15 +280,7 @@
 # so that they work with the sed-3.02 that is shipped with MSYS. We can use
 # GNU bash's $'\n' syntax to obtain such a newline.
 libintl.res: $(srcdir)/libintl.rc
-	nl=$$'\n'; \
-	sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
-	sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
-	sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
-	$(WINDRES) \
-	  "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \
-	  "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \
-	  "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \
-	  "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \
+	$(WINDRES) `$(top_srcdir)/../windows/windres-options --escape $(VERSION)`\
 	  -i $(srcdir)/libintl.rc -o libintl.res --output-format=coff
 
 ref-add.sed: $(srcdir)/ref-add.sin
