From: Paul Ramsey Date: Wed, 9 Apr 2003 21:35:56 +0000 (+0000) Subject: Cleaned up makefile and transform warning removed for null case. X-Git-Tag: pgis_0_8_0~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a085308bd75d6c1b054b8ddd2867b16da2dda7a;p=postgis Cleaned up makefile and transform warning removed for null case. git-svn-id: http://svn.osgeo.org/postgis/trunk@258 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/Makefile b/Makefile index 9defe7bc5..d535e05e6 100644 --- a/Makefile +++ b/Makefile @@ -3,14 +3,14 @@ #--------------------------------------------------------------- # Set USE_PROJ to 1 for Proj4 reprojection support # -USE_PROJ=1 +USE_PROJ=0 PROJ_DIR=/usr/local #--------------------------------------------------------------- # Set USE_GEOS to 1 for GEOS spatial predicate and operator # support # -USE_GEOS=1 +USE_GEOS=0 GEOS_DIR=/usr/local #--------------------------------------------------------------- @@ -53,38 +53,35 @@ else endif endif -#--------------------------------------------------------------- -# Regression test temporary database. -# -TEST_DB=geom_regress - #--------------------------------------------------------------- # Shared library parameters. # NAME=postgis SO_MAJOR_VERSION=0 -SO_MINOR_VERSION=7 +SO_MINOR_VERSION=8 #--------------------------------------------------------------- -# override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -# Altered for Cynwin + +override CFLAGS += -g +override CFLAGS += -I$(srcdir) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"' +override CFLAGS += -DUSE_VERSION=$(USE_VERSION) + ifeq ($(USE_PROJ),1) - override CPPFLAGS := -g -I$(PROJ_DIR)/include -I$(srcdir) $(CPPFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"' -DUSE_PROJ -DUSE_VERSION=$(USE_VERSION) -else - override CPPFLAGS := -g -I$(srcdir) $(CPPFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"' -DUSE_VERSION=$(USE_VERSION) + override CFLAGS += -I$(PROJ_DIR)/include -DUSE_PROJ endif ifeq ($(USE_GEOS),1) - override CPPFLAGS := $(CPPFLAGS) -I$(GEOS_DIR)/include/geos -DUSE_GEOS + override CFLAGS += -I$(GEOS_DIR)/include/geos -DUSE_GEOS endif -override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS) -CXXFLAGS=-I$(PROJ_DIR)/include -I$(GEOS_DIR)/include/geos +override DLLLIBS += $(BE_DLLLIBS) + +override CXXFLAGS := $(CFLAGS) #--------------------------------------------------------------- # Add index selectivity to C flags # ifeq ($(USE_STATS),1) - override CPPFLAGS += -DUSE_STATS + override CFLAGS += -DUSE_STATS endif #--------------------------------------------------------------- @@ -98,22 +95,26 @@ else GIST_ESTIMATE=postgis_estimate.o endif -OBJS=postgis_debug.o postgis_ops.o postgis_fn.o postgis_inout.o postgis_proj.o postgis_chip.o postgis_transform.o postgis_geos.o postgis_geos_wrapper.o postgis_gist_$(GIST_SUPPORT).o $(GIST_ESTIMATE) +ifeq ($(USE_GEOS),1) + GEOS_WRAPPER=postgis_geos_wrapper.o +endif + +OBJS=postgis_debug.o postgis_ops.o postgis_fn.o postgis_inout.o postgis_proj.o postgis_chip.o postgis_transform.o postgis_gist_$(GIST_SUPPORT).o $(GIST_ESTIMATE) postgis_geos.o $(GEOS_WRAPPER) #--------------------------------------------------------------- # Add libraries that libpq depends (or might depend) on into the # shared library link. (The order in which you list them here doesn't # matter.) - -SHLIB_LINK=$(filter -L%, $(LDFLAGS)) $(BE_DLLLIBS) -lstdc++ -L$(PROJ_DIR)/lib -lproj -L$(GEOS_DIR)/lib -lgeos -#ifeq ($(USE_PROJ),1) -# SHLIB_LNK=$(SHLIB_LNK) -L$(PROJ_DIR)/lib -lproj -#endif -#ifeq ($(USE_GEOS),1) -# SHLIB_LNK=$(SHLIB_LNK) -L$(GEOS_DIR)/lib -lgeos -#endif - +SHLIB_LINK = $(filter -L%, $(LDFLAGS)) +ifeq ($(USE_PROJ),1) + SHLIB_LINK += -L$(PROJ_DIR)/lib -lproj +endif +ifeq ($(USE_GEOS),1) + SHLIB_LINK += -L$(GEOS_DIR)/lib -lgeos +endif +SHLIB_LINK += -lstdc++ +SHLIB_LINK += $(BE_DLLLIBS) #--------------------------------------------------------------- # Makefile targets diff --git a/postgis_transform.c b/postgis_transform.c index d1a458af9..ecc7315ac 100644 --- a/postgis_transform.c +++ b/postgis_transform.c @@ -434,5 +434,6 @@ Datum transform_geom(PG_FUNCTION_ARGS) //memcpy(result,geom1, geom1->size); ///elog(NOTICE,"PostGIS transform //PG_RETURN_POINTER(result); + PG_RETURN_NULL(); } #endif