[PATCH 2/2] Automatically find the appropriate windows-specific tools, drop dllwrap
Paul Fertser
fercerpav at gmail.com
Mon Dec 20 10:54:43 UTC 2010
This enables configure to find the tools from mingw-binutils
repository packages. Also gets rid of deprecated dllwrap and uses ld
instead.
---
configure.in | 7 +++----
scripts/Windows/Makefile.am | 4 ++--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/configure.in b/configure.in
index 6bc263e..276071e 100644
--- a/configure.in
+++ b/configure.in
@@ -408,11 +408,10 @@ NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}])
dnl ----------------------------------------------------------------------
dnl checks related to MS Windows support (MingW)
-AC_PATH_PROGS([WINDMC], [windmc], [none])
-AC_PATH_PROGS([WINDRES], [windres], [none])
-AC_PATH_PROGS([DLLWRAP], [dllwrap], [none])
+AC_CHECK_TOOL(WINDMC, windmc, none)
+AC_CHECK_TOOL(WINDRES, windres, none)
-if test "x$WINDMC" != "xnone" -a "x$WINDRES" != "xnone" -a "x$DLLWRAP" != "xnone"; then
+if test "x$WINDMC" != "xnone" -a "x$WINDRES" != "xnone"; then
nut_have_mingw_resgen="yes"
fi
diff --git a/scripts/Windows/Makefile.am b/scripts/Windows/Makefile.am
index 18d545e..b2d70f1 100644
--- a/scripts/Windows/Makefile.am
+++ b/scripts/Windows/Makefile.am
@@ -16,7 +16,7 @@ winevent.o: winevent.rc winevent.h
$(WINDRES) winevent.rc winevent.o
winevent.dll: winevent.o
- $(DLLWRAP) --output-lib=libwinevent.a --dllname=winevent.dll --driver-name=gcc winevent.o
+ $(LINK) -shared -Wl,--out-implib,libwinevent.a winevent.o
bin_PROGRAMS = nut halt
@@ -31,7 +31,7 @@ CLEANFILES = winevent.rc winevent.o winevent.dll winevent.h
else !HAVE_MINGW_RESGEN
winevent.dll:
- @echo "Not building MingW resources since the needed programs (windmc, windres, dllwrap) were not found."
+ @echo "Not building MingW resources since the needed programs (windmc, windres) were not found."
endif !HAVE_MINGW_RESGEN
--
1.5.6.5
--/9DWx/yDrRhgMJTb--
More information about the Nut-upsdev
mailing list