@@ -3,7 +3,7 @@ dnl * configure.ac
33dnl *
44dnl * Pointclound build configuration.
55dnl *
6- dnl * PgSQL Pointcloud is free and open source software provided
6+ dnl * PgSQL Pointcloud is free and open source software provided
77dnl * by the Government of Canada
88dnl * Copyright (c) 2013 Natural Resources Canada
99dnl *
@@ -49,32 +49,32 @@ AC_SUBST([POINTCLOUD_VERSION])
4949AC_DEFINE_UNQUOTED ( [ POINTCLOUD_VERSION] , [ "$POINTCLOUD_VERSION"] , [ Pointcloud version] )
5050
5151dnl ===========================================================================
52- dnl Detect ZLib if it is installed
52+ dnl Detect ZLib if it is installed
5353dnl ===========================================================================
5454
5555ZLIB_LDFLAGS=""
5656AC_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+
6868AC_SUBST ( [ ZLIB_CPPFLAGS] )
6969AC_SUBST ( [ ZLIB_LDFLAGS] )
7070
7171
7272dnl ===========================================================================
73- dnl Detect CUnit if it is installed
73+ dnl Detect CUnit if it is installed
7474dnl ===========================================================================
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
8080if 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
102102dnl Run the header/link tests
103103AC_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 ===========================================================================
138138dnl Detect the version of PostgreSQL installed on the system
139139dnl ===========================================================================
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
145145if test "x$PG_CONFIG" = "x"; then
165165
166166
167167dnl ===========================================================================
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
170170dnl packages, but don't install the Makefile it points to unless
171171dnl the postgresql-server-dev packages are installed :)
172172dnl ===========================================================================
@@ -181,9 +181,9 @@ AC_SUBST([PGXS])
181181
182182dnl Extract the version information from pg_config
183183dnl 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'`
187187PGSQL_FULL_VERSION=`$PG_CONFIG --version`
188188PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION"
189189
@@ -195,7 +195,7 @@ AC_MSG_RESULT([checking PostgreSQL version... $PGSQL_FULL_VERSION])
195195dnl Ensure that we are using PostgreSQL >= 9.0
196196if test ! "$PGSQL_MAJOR_VERSION" -ge 9; then
197197 AC_MSG_ERROR ( [ PointCloud requires PostgreSQL >= 9.0] )
198- fi
198+ fi
199199
200200dnl Extract the linker and include flags for the frontend (for programs that use libpq)
201201PGSQL_FE_LDFLAGS=-L`$PG_CONFIG --libdir`" -lpq"
@@ -219,16 +219,16 @@ AC_CHECK_LIB([pq], [PQserverVersion],
219219 [ ] )
220220LIBS="$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] )
223223AC_SUBST ( [ PGSQL_VERSION] )
224224
225225
226226dnl ===========================================================================
227- dnl Detect LibXML2
227+ dnl Detect LibXML2
228228dnl ===========================================================================
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
234234if 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
253253fi
254254
255255
256- dnl Extract the linker and include flags
256+ dnl Extract the linker and include flags
257257XML2_LDFLAGS=`$XML2CONFIG --libs`
258258XML2_CPPFLAGS=`$XML2CONFIG --cflags`
259259
@@ -278,61 +278,6 @@ AC_SUBST([LIBXML2_VERSION])
278278AC_SUBST ( [ XML2_LDFLAGS] )
279279AC_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-
336281dnl ===========================================================================
337282dnl Detect LazPerf
338283dnl ===========================================================================
@@ -391,10 +336,10 @@ dnl ===========================================================================
391336dnl Output the relevant files
392337dnl ===========================================================================
393338
394- AC_OUTPUT ([
339+ AC_OUTPUT ([
395340 config.mk
396341] )
397-
342+
398343dnl ===========================================================================
399344dnl Display the configuration status information
400345dnl ===========================================================================
@@ -410,7 +355,6 @@ AC_MSG_RESULT([ PostgreSQL config: ${PG_CONFIG}])
410355AC_MSG_RESULT ( [ PostgreSQL version: ${PGSQL_FULL_VERSION}] )
411356AC_MSG_RESULT ( [ Libxml2 config: ${XML2CONFIG}] )
412357AC_MSG_RESULT ( [ Libxml2 version: ${LIBXML2_VERSION}] )
413- AC_MSG_RESULT ( [ LibGHT status: ${GHT_STATUS}] )
414358AC_MSG_RESULT ( [ LazPerf status: ${LAZPERF_STATUS}] )
415359AC_MSG_RESULT ( [ CUnit status: ${CUNIT_STATUS}] )
416360AC_MSG_RESULT ( )
0 commit comments