Skip to content

Commit 177eb2f

Browse files
authored
Merge pull request #214 from pblottiere/rip_ght
Remove GHT support
2 parents ec720f2 + ef79eda commit 177eb2f

45 files changed

Lines changed: 118 additions & 1677 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.install-libght.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ install:
1111
- sudo apt-get install -qq g++-4.8
1212
- export CXX="g++-4.8"
1313
- sh .install-lazperf.sh
14-
- sh .install-libght.sh
1514
- npm install -g eclint@1.1.5
1615

1716
addons:
@@ -26,7 +25,6 @@ addons:
2625

2726
script:
2827
- eclint check * */* */cunit/*
29-
- ./tools/build-install.sh --with-lazperf=/usr/local --with-libght=/usr/local && make check
30-
- ./tools/build-install.sh --with-lazperf=/usr/local --without-libght && ./tools/valgrind.sh
28+
- ./tools/build-install.sh --with-lazperf=/usr/local && make check && ./tools/valgrind.sh
3129
- make installcheck || { cat pgsql/regression.diffs && false; }
3230
- (cd tools/benchmark_compression && sh compression_benchmark.sh)

README.md

Lines changed: 57 additions & 75 deletions
Large diffs are not rendered by default.

config.mk.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ ZLIB_LDFLAGS = @ZLIB_LDFLAGS@
1111
CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@
1212
CUNIT_LDFLAGS = @CUNIT_LDFLAGS@
1313

14-
GHT_CPPFLAGS = @GHT_CPPFLAGS@
15-
GHT_LDFLAGS = @GHT_LDFLAGS@
16-
1714
PG_CONFIG = @PG_CONFIG@
1815
PGXS = @PGXS@
1916

configure.ac

Lines changed: 29 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dnl * configure.ac
33
dnl *
44
dnl * Pointclound build configuration.
55
dnl *
6-
dnl * PgSQL Pointcloud is free and open source software provided
6+
dnl * PgSQL Pointcloud is free and open source software provided
77
dnl * by the Government of Canada
88
dnl * Copyright (c) 2013 Natural Resources Canada
99
dnl *
@@ -49,32 +49,32 @@ AC_SUBST([POINTCLOUD_VERSION])
4949
AC_DEFINE_UNQUOTED([POINTCLOUD_VERSION], ["$POINTCLOUD_VERSION"], [Pointcloud version])
5050

5151
dnl ===========================================================================
52-
dnl Detect ZLib if it is installed
52+
dnl Detect ZLib if it is installed
5353
dnl ===========================================================================
5454

5555
ZLIB_LDFLAGS=""
5656
AC_CHECK_HEADER([zlib.h], [
5757
ZLIB_CPPFLAGS="$CPPFLAGS"
58-
AC_CHECK_LIB([z],
59-
[inflate],
60-
[ZLIB_LDFLAGS="$LDFLAGS -lz"],
58+
AC_CHECK_LIB([z],
59+
[inflate],
60+
[ZLIB_LDFLAGS="$LDFLAGS -lz"],
6161
[AC_MSG_ERROR([could not locate zlib])]
6262
)
6363
],
6464
[
6565
AC_MSG_ERROR([could not locate zlib])
6666
])
67-
67+
6868
AC_SUBST([ZLIB_CPPFLAGS])
6969
AC_SUBST([ZLIB_LDFLAGS])
7070

7171

7272
dnl ===========================================================================
73-
dnl Detect CUnit if it is installed
73+
dnl Detect CUnit if it is installed
7474
dnl ===========================================================================
7575

76-
AC_ARG_WITH([cunit],
77-
[AS_HELP_STRING([--with-cunit=DIR], [specify the base cunit install directory])],
76+
AC_ARG_WITH([cunit],
77+
[AS_HELP_STRING([--with-cunit=DIR], [specify the base cunit install directory])],
7878
[CUNITDIR="$withval"], [CUNITDIR=""])
7979

8080
if test "x$CUNITDIR" = "xyes"; then
@@ -85,7 +85,7 @@ if test "x$CUNITDIR" != "x"; then
8585

8686
dnl CUNITDIR was specified, so let's look there!
8787

88-
dnl Build the linker and include flags
88+
dnl Build the linker and include flags
8989
CUNIT_LDFLAGS="-L${CUNITDIR}/lib"
9090
CUNIT_CPPFLAGS="-I${CUNITDIR}/include"
9191

@@ -102,9 +102,9 @@ fi
102102
dnl Run the header/link tests
103103
AC_CHECK_HEADER([CUnit/CUnit.h], [
104104
CUNIT_CPPFLAGS="$CPPFLAGS"
105-
AC_CHECK_LIB([cunit],
106-
[CU_initialize_registry],
107-
[CUNIT_LDFLAGS="$LDFLAGS -lcunit" FOUND_CUNIT="YES"],
105+
AC_CHECK_LIB([cunit],
106+
[CU_initialize_registry],
107+
[CUNIT_LDFLAGS="$LDFLAGS -lcunit" FOUND_CUNIT="YES"],
108108
[FOUND_CUNIT="NO"]
109109
)
110110
],
@@ -138,8 +138,8 @@ dnl ===========================================================================
138138
dnl Detect the version of PostgreSQL installed on the system
139139
dnl ===========================================================================
140140

141-
AC_ARG_WITH([pgconfig],
142-
[AS_HELP_STRING([--with-pgconfig=FILE], [specify an alternative pg_config file])],
141+
AC_ARG_WITH([pgconfig],
142+
[AS_HELP_STRING([--with-pgconfig=FILE], [specify an alternative pg_config file])],
143143
[PG_CONFIG="$withval"], [PG_CONFIG=""])
144144

145145
if test "x$PG_CONFIG" = "x"; then
@@ -165,8 +165,8 @@ fi
165165

166166

167167
dnl ===========================================================================
168-
dnl Ensure that $PG_CONFIG --pgxs points to a valid file. This is because some
169-
dnl distributions such as Debian also include pg_config as part of libpq-dev
168+
dnl Ensure that $PG_CONFIG --pgxs points to a valid file. This is because some
169+
dnl distributions such as Debian also include pg_config as part of libpq-dev
170170
dnl packages, but don't install the Makefile it points to unless
171171
dnl the postgresql-server-dev packages are installed :)
172172
dnl ===========================================================================
@@ -181,9 +181,9 @@ AC_SUBST([PGXS])
181181

182182
dnl Extract the version information from pg_config
183183
dnl Note: we extract the major & minor separately, ensure they are numeric, and then combine to give
184-
dnl the final version. This is to guard against user error...
185-
PGSQL_MAJOR_VERSION=`$PG_CONFIG --version | sed 's/[[A-Za-z ]]*//' | cut -d. -f1 | sed 's/[[^0-9]]//g'`
186-
PGSQL_MINOR_VERSION=`$PG_CONFIG --version | sed 's/[[A-Za-z ]]*//' | cut -d. -f2 | sed 's/[[^0-9]]//g'`
184+
dnl the final version. This is to guard against user error...
185+
PGSQL_MAJOR_VERSION=`$PG_CONFIG --version | sed 's/[[A-Za-z ]]*//' | cut -d. -f1 | sed 's/[[^0-9]]//g'`
186+
PGSQL_MINOR_VERSION=`$PG_CONFIG --version | sed 's/[[A-Za-z ]]*//' | cut -d. -f2 | sed 's/[[^0-9]]//g'`
187187
PGSQL_FULL_VERSION=`$PG_CONFIG --version`
188188
PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION"
189189

@@ -195,7 +195,7 @@ AC_MSG_RESULT([checking PostgreSQL version... $PGSQL_FULL_VERSION])
195195
dnl Ensure that we are using PostgreSQL >= 9.0
196196
if test ! "$PGSQL_MAJOR_VERSION" -ge 9; then
197197
AC_MSG_ERROR([PointCloud requires PostgreSQL >= 9.0])
198-
fi
198+
fi
199199

200200
dnl Extract the linker and include flags for the frontend (for programs that use libpq)
201201
PGSQL_FE_LDFLAGS=-L`$PG_CONFIG --libdir`" -lpq"
@@ -219,16 +219,16 @@ AC_CHECK_LIB([pq], [PQserverVersion],
219219
[])
220220
LIBS="$LIBS_SAVE"
221221

222-
AC_DEFINE_UNQUOTED([PGSQL_VERSION], [$PGSQL_VERSION], [PostgreSQL server version])
222+
AC_DEFINE_UNQUOTED([PGSQL_VERSION], [$PGSQL_VERSION], [PostgreSQL server version])
223223
AC_SUBST([PGSQL_VERSION])
224224

225225

226226
dnl ===========================================================================
227-
dnl Detect LibXML2
227+
dnl Detect LibXML2
228228
dnl ===========================================================================
229229

230-
AC_ARG_WITH([xml2config],
231-
[AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])],
230+
AC_ARG_WITH([xml2config],
231+
[AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])],
232232
[XML2CONFIG="$withval"], [XML2CONFIG=""])
233233

234234
if test "x$XML2CONFIG" = "x"; then
@@ -248,12 +248,12 @@ else
248248
AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG])
249249
else
250250
AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist])
251-
fi
251+
fi
252252
fi
253253
fi
254254

255255

256-
dnl Extract the linker and include flags
256+
dnl Extract the linker and include flags
257257
XML2_LDFLAGS=`$XML2CONFIG --libs`
258258
XML2_CPPFLAGS=`$XML2CONFIG --cflags`
259259

@@ -278,61 +278,6 @@ AC_SUBST([LIBXML2_VERSION])
278278
AC_SUBST([XML2_LDFLAGS])
279279
AC_SUBST([XML2_CPPFLAGS])
280280

281-
dnl ===========================================================================
282-
dnl Detect LibGHT
283-
dnl ===========================================================================
284-
285-
AC_ARG_WITH([libght],
286-
[AS_HELP_STRING([--with-libght=DIR], [specify the base libght installation directory])],
287-
[GHTDIR="$withval"], [GHTDIR=""])
288-
289-
if test "x$GHTDIR" = "xyes"; then
290-
AC_MSG_ERROR([you must specify a parameter to --with-libght, e.g. --with-libght=/opt/local])
291-
fi
292-
293-
if test "x$GHTDIR" = "x"; then
294-
dnl GHTDIR was not specified, so search in usual system places
295-
AC_CHECK_HEADER([ght.h], [GHT_CPPFLAGS="$CPPFLAGS" FOUND_GHT_H="YES"], [FOUND_GHT_H="NO"])
296-
AC_CHECK_LIB([ght], [ght_init], [GHT_LDFLAGS="-lght" FOUND_GHT_LIB="YES"], [FOUND_GHT_LIB="NO"])
297-
elif test "x$GHTDIR" != "xno"; then
298-
dnl GHTDIR was specified, so let's look there!
299-
300-
301-
dnl Extract the linker and include flags
302-
GHT_LDFLAGS="-L${GHTDIR}/lib -lght"
303-
GHT_CPPFLAGS="-I${GHTDIR}/include"
304-
305-
dnl Check headers file
306-
CPPFLAGS_SAVE="$CPPFLAGS"
307-
CPPFLAGS="$GHT_CPPFLAGS $XML2_CPPFLAGS"
308-
309-
dnl Check libraries file
310-
LIBS_SAVE="$LIBS"
311-
LIBS="$GHT_LDFLAGS $XML2_LDFLAGS"
312-
313-
AC_CHECK_HEADER([ght.h], [FOUND_GHT_H="YES"], [FOUND_GHT_H="NO"])
314-
AC_CHECK_LIB([ght], [ght_init], [FOUND_GHT_LIB="YES"], [FOUND_GHT_LIB="NO"])
315-
316-
dnl back to the originals
317-
LIBS="${LIBS_SAVE}"
318-
CPPFLAGS="${CPPFLAGS_SAVE}"
319-
fi
320-
321-
if test "x$FOUND_GHT_H" = "xYES" -a "x$FOUND_GHT_LIB" = "xYES"; then
322-
AC_DEFINE([HAVE_LIBGHT], [1], [Have libght])
323-
GHT_STATUS="enabled"
324-
if test $GHTDIR; then
325-
GHT_STATUS="$GHTDIR"
326-
fi
327-
else
328-
GHT_LDFLAGS=""
329-
GHT_CPPFLAGS=""
330-
GHT_STATUS="disabled"
331-
fi
332-
333-
AC_SUBST([GHT_LDFLAGS])
334-
AC_SUBST([GHT_CPPFLAGS])
335-
336281
dnl ===========================================================================
337282
dnl Detect LazPerf
338283
dnl ===========================================================================
@@ -391,10 +336,10 @@ dnl ===========================================================================
391336
dnl Output the relevant files
392337
dnl ===========================================================================
393338

394-
AC_OUTPUT([
339+
AC_OUTPUT([
395340
config.mk
396341
])
397-
342+
398343
dnl ===========================================================================
399344
dnl Display the configuration status information
400345
dnl ===========================================================================
@@ -410,7 +355,6 @@ AC_MSG_RESULT([ PostgreSQL config: ${PG_CONFIG}])
410355
AC_MSG_RESULT([ PostgreSQL version: ${PGSQL_FULL_VERSION}])
411356
AC_MSG_RESULT([ Libxml2 config: ${XML2CONFIG}])
412357
AC_MSG_RESULT([ Libxml2 version: ${LIBXML2_VERSION}])
413-
AC_MSG_RESULT([ LibGHT status: ${GHT_STATUS}])
414358
AC_MSG_RESULT([ LazPerf status: ${LAZPERF_STATUS}])
415359
AC_MSG_RESULT([ CUnit status: ${CUNIT_STATUS}])
416360
AC_MSG_RESULT()

lib/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
include ../config.mk
33

4-
CPPFLAGS = $(XML2_CPPFLAGS) $(ZLIB_CPPFLAGS) $(GHT_CPPFLAGS) $(LAZPERF_CPPFLAGS)
5-
LDFLAGS = $(XML2_LDFLAGS) $(ZLIB_LDFLAGS) $(GHT_LDFLASGS)
4+
CPPFLAGS = $(XML2_CPPFLAGS) $(ZLIB_CPPFLAGS) $(LAZPERF_CPPFLAGS)
5+
LDFLAGS = $(XML2_LDFLAGS) $(ZLIB_LDFLAGS)
66
CFLAGS += -fPIC
77

88
OBJS = \
@@ -13,7 +13,6 @@ OBJS = \
1313
pc_patch.o \
1414
pc_patch_dimensional.o \
1515
pc_patch_uncompressed.o \
16-
pc_patch_ght.o \
1716
pc_point.o \
1817
pc_pointlist.o \
1918
pc_schema.o \

lib/cunit/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
include ../../config.mk
33

4-
CPPFLAGS = $(XML2_CPPFLAGS) $(CUNIT_CPPFLAGS) $(ZLIB_CPPFLAGS) $(GHT_CPPFLAGS) -I..
5-
LDFLAGS = $(XML2_LDFLAGS) $(CUNIT_LDFLAGS) $(ZLIB_LDFLAGS) $(GHT_LDFLAGS)
4+
CPPFLAGS = $(XML2_CPPFLAGS) $(CUNIT_CPPFLAGS) $(ZLIB_CPPFLAGS) -I..
5+
LDFLAGS = $(XML2_LDFLAGS) $(CUNIT_LDFLAGS) $(ZLIB_LDFLAGS)
66

77
EXE = cu_tester
88

@@ -13,7 +13,6 @@ OBJS = \
1313
cu_pc_schema.o \
1414
cu_pc_point.o \
1515
cu_pc_patch.o \
16-
cu_pc_patch_ght.o \
1716
cu_pc_patch_lazperf.o \
1817
cu_pc_sort.o \
1918
cu_pc_util.o

0 commit comments

Comments
 (0)