Win32 build fixes
authorAndy Spencer <andy753421@gmail.com>
Sun, 2 May 2010 01:31:59 +0000 (01:31 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 2 May 2010 02:14:56 +0000 (02:14 +0000)
.gitignore
configure.ac
gen-win32.sh
src/Makefile.am
src/gis-test.c

index baff3a0..e3a68c6 100644 (file)
@@ -3,6 +3,7 @@
 *~
 .*.swp
 .swp
+build/
 Makefile
 Makefile.in
 aclocal.m4
index 6aa57c8..14e1353 100644 (file)
@@ -24,6 +24,9 @@ case "${host}" in
        *cygwin*)  WIN32="yes" ;;
        *)         WIN32="no"  ;;
 esac
+if test "$WIN32" = yes; then
+       ac_default_prefix="/"
+fi
 AM_CONDITIONAL([WIN32],    test "$WIN32" = "yes")
 AM_CONDITIONAL([NOTWIN32], test "$WIN32" = "no")
 
index 7106b06..ec4c407 100755 (executable)
@@ -1,7 +1,3 @@
 #!/bin/bash
-dir=$(dirname $(readlink -f $0))
-./autogen.sh \
-       "--host=i686-pc-mingw32" \
-       "--libdir=Z:$dir/src/.libs" \
-       "--includedir=Z:$dir/include" \
-       CFLAGS="-g -Werror -Wno-unused $CFLAGS"
+export CFLAGS="-g -Werror -Wno-unused -O3"
+./autogen.sh --host=i686-pc-mingw32
index 1673dff..b41ca09 100644 (file)
@@ -37,15 +37,18 @@ libgis_la_SOURCES = gis.h \
        roam.c        roam.h        \
        gpqueue.c     gpqueue.h
 libgis_la_CPPFLAGS = $(AM_CPPFLAGS) \
-       -DPKGDATADIR="\"$(datadir)/gis\"" \
-       -DPLUGINSDIR="\"$(libdir)/gis\""
+       -DPKGDATADIR="\"$(dots)$(datadir)/gis\"" \
+       -DPLUGINSDIR="\"$(dots)$(libdir)/gis\""
 libgis_la_LIBADD  = $(AM_LDADD) \
        objects/libgis-objects.la \
        data/libgis-data.la
 
 # Demo program
-if NOTWIN32
-BINLDFLAGS = -static
+if WIN32
+AM_LDFLAGS += -mwindows
+dots        = ..
+else
+BINLDFLAGS  = -static
 endif
 
 bin_PROGRAMS = gis-demo
index 6366ade..1146f41 100644 (file)
@@ -88,8 +88,8 @@ int main(int argc, char **argv)
 
        /* Configurable stuff */
        gis_viewer_set_offline(viewer, TRUE);
-       //load_plugin(plugins, "elev",  viewer, prefs, GTK_NOTEBOOK(config));
-       //load_plugin(plugins, "env",   viewer, prefs, GTK_NOTEBOOK(config));
+       load_plugin(plugins, "elev",  viewer, prefs, GTK_NOTEBOOK(config));
+       load_plugin(plugins, "env",   viewer, prefs, GTK_NOTEBOOK(config));
        //load_plugin(plugins, "map",   viewer, prefs, GTK_NOTEBOOK(config));
        load_plugin(plugins, "sat",   viewer, prefs, GTK_NOTEBOOK(config));
        //load_plugin(plugins, "test",  viewer, prefs, GTK_NOTEBOOK(config));