]> granicus.if.org Git - postgis/commitdiff
Alter the lwgeom Makefile so that liblwgeom.a is linked directly, rather than using...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 21 Aug 2008 08:45:07 +0000 (08:45 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 21 Aug 2008 08:45:07 +0000 (08:45 +0000)
Also change the PGXS CPP/LIB equivalent variables to use += so that extra compile/link options can be supplied. Per report from Robert Rainthorpe, with thanks to William Kyngesburye.

git-svn-id: http://svn.osgeo.org/postgis/trunk@2918 b70326c6-7e19-0410-871a-916f4a2858ee

loader/Makefile.pgsql2shp.in
loader/Makefile.shp2pgsql.in
lwgeom/Makefile.in

index e3931ae60cf3e31cd1e6f902a01bebd13346e8b7..196c06406b15e96d009a763feb994145796af08d 100644 (file)
@@ -19,8 +19,8 @@ OBJS= shpopen.o \
        pgsql2shp.o
 
 # Link against libpq
-PG_CPPFLAGS=@PGSQL_FE_CPPFLAGS@
-PG_LIBS=@PGSQL_FE_LDFLAGS@ -lpq
+PG_CPPFLAGS+=@PGSQL_FE_CPPFLAGS@
+PG_LIBS+=@PGSQL_FE_LDFLAGS@ -lpq
 
 
 # PGXS information
index 5313d09b31ed62805efebb7460141af8c938f2c9..7a9e5d8c68a3b3f45638bfc61514385f5db07555 100644 (file)
@@ -19,7 +19,7 @@ OBJS= shpopen.o \
        shp2pgsql.o
 
 # Link against libiconv where available
-PG_LIBS=@ICONV_LDFLAGS@
+PG_LIBS+=@ICONV_LDFLAGS@
 
 # PGXS information
 PG_CONFIG = @PGCONFIG@ 
index 78f4320042cd957b907d5c6c30db574d6d0b4549..c13a7478f4931f66f1b87a9c3d950a13e93dd5a9 100644 (file)
@@ -53,8 +53,14 @@ PG_OBJS=lwgeom_pg.o \
 OBJS=$(PG_OBJS)
 
 # Libraries to link into the module (proj, geos)
-PG_CPPFLAGS=@CPPFLAGS@ -I../liblwgeom
-SHLIB_LINK=@SHLIB_LINK@ -L../liblwgeom -llwgeom
+#
+# Note: we specify liblwgeom.a directly in SHLIB_LINK rather than using
+# -L... -l options to prevent issues with some platforms trying to link
+# to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an
+# older version of PostGIS, rather than with the static liblwgeom.a 
+# supplied with newer versions of PostGIS
+PG_CPPFLAGS+=@CPPFLAGS@ -I../liblwgeom
+SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/liblwgeom.a
 
 # Extra files to remove during 'make clean'
 EXTRA_CLEAN=$(SQL_OBJS)