Fix windows build issues
authorSam Thursfield <samthursfield@codethink.co.uk>
Fri, 22 Jul 2011 14:35:14 +0000 (15:35 +0100)
committerSam Thursfield <samthursfield@codethink.co.uk>
Fri, 22 Jul 2011 14:35:14 +0000 (15:35 +0100)
Makefile.am
README.windows
configure.ac

index a8f83eb..27700b7 100644 (file)
@@ -147,8 +147,8 @@ noinst_PROGRAMS = \
         tests/basic
 
 examples_service_selection_SOURCES = examples/service-selection.c
-examples_service_selection_CPPFLAGS = $(libmoonshot_CFLAGS) $(AM_CPPFLAGS)
-examples_service_selection_LDADD = ${top_builddir}/libmoonshot/libmoonshot.la
+examples_service_selection_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
+examples_service_selection_LDADD = ${top_builddir}/libmoonshot/libmoonshot.la $(moonshot_LIBS)
 
 examples_client_SOURCES = examples/client.c
 examples_client_CPPFLAGS = $(libmoonshot_CFLAGS) $(AM_CPPFLAGS)
index 4430c99..2872549 100644 (file)
@@ -56,10 +56,22 @@ MIDL.EXE and the RPC API to make it usable from gcc.
   ./waf
   ./waf install
 
-You can then build moonshot from the MSYS shell:
+You can then configure moonshot from the MSYS shell:
 
   ACLOCAL="aclocal -I/c/build/share/aclocal" PKG_CONFIG_PATH=/c/build/lib/pkgconfig \
-  ./autogen.sh --disable-maintainer-mode
+    ./autogen.sh --disable-maintainer-mode
+
+The configure script looks for various tools that it may not be able to locate
+automatically. In these cases you will get an error message, and you can set the
+environment variable described there to the location of the program. For example,
+if LIB.EXE is not found you will need to run
+
+  ACLOCAL="aclocal -I/c/build/share/aclocal" PKG_CONFIG_PATH=/c/build/lib/pkgconfig \
+    MSVC_LIB="/c/Program Files/...VC location../bin/lib.exe" \
+    ./autogen.sh --disable-maintainer-mode
+
+If this succeeds, you're ready to build!
+
   make
   make icons
   make installer
@@ -71,9 +83,13 @@ Weird things that might go wrong
 MSYS is a little fragile, here are some things to try if you get weird failures
 of any component:
 
-# Make sure your PATH looks like this:
-#   /c/build/bin:/c/tools/python:/usr/local/bin:/mingw/bin:/bin
-# so that there are no entries before these that might override a shell tool.
+  * Make sure your PATH looks like this:
+      /c/build/bin:/c/tools/python:/usr/local/bin:/mingw/bin:/bin
+    so that there are no entries before these that might override a shell tool.
+
+  * Sometimes TMP is set and this breaks some of the tools. Run:
+      export TMP=
+    to fix this.
 
-# Sometimes TMP is set and this breaks some of the tools
-export TMP=
+  * Don't ever use \ in paths (except to escape spaces) - always use /c/build/bin
+    not c:\build\bin. Otherwise shell scripts break all over the place.
index b7d53f2..e1783c3 100644 (file)
@@ -66,7 +66,8 @@ if test "$win32" = "yes"; then
   # Other Windows-specific tools
 
   # LIB.EXE from MSVC to build an MSVC-compatible import library.
-  AC_PATH_PROG([MSVC_LIB], [lib], no)
+  AC_PATH_PROG([MSVC_LIB], [lib], no,
+               [/c/Program\ Files/Microsoft\ Visual\ Studio\ 9.0/VC/bin$PATH_SEPARATOR$PATH])
 
   if test "$MSVC_LIB" = "no"; then
      AC_MSG_WARN([