[postgis-commits] svn - r3542 - in trunk: . loader

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Jan 20 09:48:44 PST 2009


Author: pramsey
Date: 2009-01-20 09:48:44 -0800 (Tue, 20 Jan 2009)
New Revision: 3542

Modified:
   trunk/configure.ac
   trunk/loader/Makefile.in
Log:
Replace hand-built pkg-config routine w/ m4 from gtk source.


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2009-01-20 07:36:49 UTC (rev 3541)
+++ trunk/configure.ac	2009-01-20 17:48:44 UTC (rev 3542)
@@ -460,7 +460,7 @@
 		*apple*)
 			for frmwrk [ in Cairo GLib Gtk ]; do
 				if test -d /Library/Frameworks/${frmwrk}.framework; then
-					GTK_INCLUDES="$GTK_INCLUDES -I/Library/Frameworks/${frmwrk}.framework/Headers" 
+					GTK_CFLAGS="$GTK_CFLAGS -I/Library/Frameworks/${frmwrk}.framework/Headers" 
 					GTK_LIBS="$GTK_LIBS -framework $frmwrk" 
 					AC_MSG_RESULT([GUI: Found /Library/Frameworks/${frmwrk}.framework])
 				else
@@ -471,20 +471,10 @@
 			;;
 		*)
 			dnl Try to find the GTK libs with pkgconfig 
-			if ! test -x `which pkg-config`; then
-				AC_MSG_ERROR([GUI: Building GTK applications requires 'pkg-config', please install it.])
-			else
-				AC_MSG_RESULT([GUI: Running 'pkg-config gtk+-2.0 --cflags'])
-				GTK_INCLUDES=`pkg-config gtk+-2.0 --cflags`
-				AC_MSG_RESULT([GUI: Running 'pkg-config gtk+-2.0 --libs'])
-				GTK_LIBS=`pkg-config gtk+-2.0 --libs`
-				if test ! "x$GTK_LIBS" = "x"; then
-					GTK_BUILD="gui"
-				fi
-			fi
+			AM_PATH_GTK_2_0([2.8.0], [GTK_BUILD="gui"], [GTK_BUILD=""])
 	esac
 fi
-AC_SUBST([GTK_INCLUDES])
+AC_SUBST([GTK_CFLAGS])
 AC_SUBST([GTK_LIBS])
 AC_SUBST([GTK_BUILD])
 

Modified: trunk/loader/Makefile.in
===================================================================
--- trunk/loader/Makefile.in	2009-01-20 07:36:49 UTC (rev 3541)
+++ trunk/loader/Makefile.in	2009-01-20 17:48:44 UTC (rev 3542)
@@ -33,7 +33,7 @@
 LIBLWGEOM=../liblwgeom/liblwgeom.a
 
 # GTK includes and libraries
-GTK_INCLUDES = @GTK_INCLUDES@
+GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 
 all: $(SHP2PGSQL) $(PGSQL2SHP) $(SHP2PGSQL-CLI) @GTK_BUILD@
@@ -58,7 +58,7 @@
 	$(CC) $(CFLAGS) -DPGUI -c -o $@ $^
 
 shp2pgsql-gui.o: shp2pgsql-gui.c
-	$(CC) $(PGSQL_FE_CPPFLAGS) $(CFLAGS) $(GTK_INCLUDES) -o $@ -c shp2pgsql-gui.c
+	$(CC) $(PGSQL_FE_CPPFLAGS) $(CFLAGS) $(GTK_CFLAGS) -o $@ -c shp2pgsql-gui.c
 
 $(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o shp2pgsql-core-gui.o shp2pgsql-gui.o $(LIBLWGEOM) 
 	$(CC) $(CFLAGS) $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm $^ -o $@



More information about the postgis-commits mailing list