]> granicus.if.org Git - postgis/commitdiff
Make GUI open w/o console under Win32
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 18 Dec 2009 05:55:45 +0000 (05:55 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 18 Dec 2009 05:55:45 +0000 (05:55 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5023 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
loader/Makefile.in

index 3f57e1b9e9e28006b9a0656ba86bb896d23d32ba..02350fc783770b22f4862aa16c326cd804ac0a5a 100644 (file)
@@ -565,9 +565,20 @@ if test "x$GUI" = "xyes"; then
                        dnl Try to find the GTK libs with pkgconfig 
                        AM_PATH_GTK_2_0([2.8.0], [GTK_BUILD="gui"], [GTK_BUILD=""])
        esac
+
+       dnl Add -mwindows to MinGW GUI build
+       case $host in
+               *mingw32*)
+                       GTK_WIN32="-mwindows"
+                       ;;
+       esac
 fi
+
+
+
 AC_SUBST([GTK_CFLAGS])
 AC_SUBST([GTK_LIBS])
+AC_SUBST([GTK_WIN32])
 AC_SUBST([GTK_BUILD])
 
 
index 8893ad3cade7d9b25b7bbdf3361245c0e3846465..deb51faed175e477bc6aba17a8103df78c914554 100644 (file)
@@ -44,6 +44,7 @@ LIBLWGEOM=../liblwgeom/liblwgeom.a
 # GTK includes and libraries
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
+GTK_WIN32 = @GTK_WIN32@
 
 # If REGRESS=1 passed as a parameter, change the default install paths
 # so that no prefix is included. This allows us to relocate to a temporary
@@ -81,7 +82,7 @@ shp2pgsql-gui.o: shp2pgsql-gui.c
        $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) $(GTK_CFLAGS) -o $@ -c shp2pgsql-gui.c
 
 $(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o shp2pgsql-core.o shp2pgsql-gui.o $(LIBLWGEOM) 
-       $(CC) $(CFLAGS) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm 
+       $(CC) $(CFLAGS) $(GTK_WIN32) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm 
 
 install: all
        @mkdir -p $(DESTDIR)$(bindir)