]> Pileus Git - aweather/commitdiff
Win32 port (and gnulib)
authorAndy Spencer <andy753421@gmail.com>
Sat, 1 May 2010 01:04:36 +0000 (01:04 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 1 May 2010 01:10:48 +0000 (01:10 +0000)
- Add support for Gnulib
  - Used for strptime

- Add "b" to wsr88ddec

.gitignore
Makefile.am
autogen.sh
configure.ac
gen-win32.sh [new file with mode: 0755]
src/plugins/Makefile.am
src/plugins/radar.c
src/wsr88ddec.c

index ccbb51d7d88f9602b590fed99753ad86fc40df6a..7ca04826e22f95d7c403718d0e1dabba68208e84 100644 (file)
@@ -1,6 +1,9 @@
 *.bz2
 *.gz
 *~
+/arg-nonnull.h
+/c++defs.h
+/warn-on-use.h
 Makefile
 Makefile.in
 aclocal.m4
@@ -18,6 +21,7 @@ depcomp
 gmon.out
 gtk-doc.make
 install-sh
+lib
 libtool
 local
 ltmain.sh
index 74c25e0d3acd40b930151e1d5bdedbc802787eae..f472e79c51e3fd918c9a1933918a223242581c09 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = src data docs
+SUBDIRS = lib src data docs
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -6,6 +6,8 @@ MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.h.in config.sub \
                       configure depcomp gtk-doc.make install-sh ltmain.sh \
                       Makefile.in missing
 
+EXTRA_DIST = m4/gnulib-cache.m4
+
 test: all
        (cd src && make test)
 
index 086ea135813ad175ded22febcf021eaaffbd2957..bd6daa8b8f384426cfea98d6f0f41de1b4033ee1 100755 (executable)
@@ -1,10 +1,12 @@
 #!/bin/sh
 
+gnulib-tool --no-vc-files --import strptime
+
 libtoolize
-aclocal
+aclocal -I m4
+autoconf
 autoheader
 automake -a -c
-autoconf
 
 # Run configure
 ./configure "$@"
index 8a02052a3e070ac7f18c71daf226e6530ccbc532..d938eb9c232f73e1d95f6edb050ec3376d34a52f 100644 (file)
@@ -7,8 +7,10 @@ AC_CONFIG_MACRO_DIR([m4])
 
 # Check for required programs
 AC_PROG_CC
+gl_EARLY
 AC_PROG_LIBTOOL
 PKG_PROG_PKG_CONFIG
+gl_INIT
 
 # Check for required packages
 PKG_CHECK_MODULES(GLIB, glib-2.0)
@@ -22,6 +24,7 @@ AC_SUBST(RSL_LIBS)
 # Output 
 AC_CONFIG_FILES([
        Makefile
+       lib/Makefile
        src/Makefile
        src/plugins/Makefile
        data/Makefile
diff --git a/gen-win32.sh b/gen-win32.sh
new file mode 100755 (executable)
index 0000000..82ac5d4
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+dir=$(dirname $(readlink -f $0))
+PKG_CONFIG_PATH="../libgis-win32/src/" \
+./autogen.sh \
+       "--host=i686-pc-mingw32" \
+       "--datadir=Z:$dir/data/" \
+       "--libdir=Z:$dir/src/plugins/" \
+       CFLAGS="-g -Werror -Wno-unused $CFLAGS"
index 7f0f17f69bf69241a029d0eab139184c2ae5ac69..be1352430be8d7aa5b700f0fe896ebf3acf73560 100644 (file)
@@ -14,6 +14,7 @@ radar_la_SOURCES = \
        level2.c level2.h \
        ../aweather-colormap.c \
        ../aweather-location.c
+radar_la_LIBADD  = $(addprefix $(top_srcdir)/lib/,$(gl_LTLIBOBJS))
 radar_la_LDFLAGS = $(AM_LDFLAGS) $(RSL_LIBS)
 endif
 
index a42b4a53011e3b2151e19345cb5a2f3023dbfa03..55b8889d3f9454375ccced7ef99067225de5ccc0 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #define _XOPEN_SOURCE
-#include <time.h>
+#include <sys/time.h>
 #include <config.h>
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
index 8aea6e50f90cad08f71ff32148181ce19321e2e3..71fc432369e56737077ed9f3a53b3efe9db9908f 100644 (file)
@@ -67,8 +67,8 @@ int main(int argc, char **argv)
                return 0;
        }
 
-       FILE *input  = fopen(argv[1], "r");
-       FILE *output = fopen(argv[2], "w+");
+       FILE *input  = fopen(argv[1], "rb");
+       FILE *output = fopen(argv[2], "wb+");
        if (!input)  g_error("error opening input");
        if (!output) g_error("error opening output");