This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH] cygutils: cross-compiling fix
- From: Yaakov (Cygwin/X) <yselkowitz at users dot sourceforge dot net>
- To: cygwin-apps at cygwin dot com
- Date: Wed, 20 Feb 2013 17:35:30 -0600
- Subject: [PATCH] cygutils: cross-compiling fix
Chuck,
When cross-compiling, w32api isn't going to be under /usr/lib; the
specific syntax I used was the only one I could get to work with
automake -Wall -Werror. Patch attached.
Yaakov
2013-02-20 Yaakov Selkowitz <yselkowitz@...>
* Makefile.am: Use $CC -print-file-name to find the location
of w32api libuuid.a, to allow cross-compiling.
Index: Makefile.am
===================================================================
RCS file: /cvs/cygwin-apps/cygutils/Makefile.am,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile.am
--- Makefile.am 5 Feb 2012 20:50:18 -0000 1.39
+++ Makefile.am 20 Feb 2013 22:34:43 -0000
@@ -112,6 +112,7 @@ DISTCLEANFILES = \
po/remove-potcdate.sed \
src/cygicons/cygicons.rc
+libuuid = `${CC} -print-file-name=w32api/libuuid.a`
src_banner_banner_LDADD = -lpopt -lkernel32 -lgdi32
src_clip_getclip_LDADD = -lpopt
src_clip_putclip_LDADD = -lpopt
@@ -119,8 +120,10 @@ src_conv_conv_LDADD = -l
src_cygstart_cygstart_LDADD = -lpopt
src_dump_dump_LDADD = -lpopt
src_lpr_lpr_LDADD = -lwinspool
-src_mkshortcut_mkshortcut_LDADD = -lpopt -lole32 /usr/lib/w32api/libuuid.a
-src_readshortcut_readshortcut_LDADD = -lpopt -lole32 /usr/lib/w32api/libuuid.a
+src_mkshortcut_mkshortcut_LDADD = -lpopt -lole32
+src_mkshortcut_mkshortcut_LDFLAGS = ${libuuid}
+src_readshortcut_readshortcut_LDADD = -lpopt -lole32
+src_readshortcut_readshortcut_LDFLAGS = ${libuuid}
src_lpr_lpr_SOURCES = \
src/lpr/Printer.cc src/lpr/Win32Utils.cc \