Commit 7d3e4f0e authored by Darafei Praliaskouski's avatar Darafei Praliaskouski

Address configure issues for unusual CC/CFLAGS

Patch by Raúl Marín Rodríguez.

Closes #3995
Closes https://github.com/postgis/postgis/pull/195


git-svn-id: http://svn.osgeo.org/postgis/trunk@16342 b70326c6-7e19-0410-871a-916f4a2858ee
parent 7f645770
Pipeline #16380328 passed with stage
in 17 minutes and 9 seconds
......@@ -518,11 +518,20 @@ if test "x$LIBLWGEOM_ONLY" = "xno"; then
dnl Ensure we can link against libpq
LIBS_SAVE="$LIBS"
LIBS="$PGSQL_FE_LDFLAGS"
CC_SAVE="$CC"
CC=`"$PG_CONFIG" --cc`
CFLAGS_SAVE="$CFLAGS"
CFLAGS=`"$PG_CONFIG" --cflags`
AC_CHECK_LIB([pq], [PQserverVersion],
[],
[AC_MSG_ERROR([could not find libpq])],
[])
LIBS="$LIBS_SAVE"
CC="$CC_SAVE"
CFLAGS="$CFLAGS_SAVE"
AC_DEFINE_UNQUOTED([POSTGIS_PGSQL_VERSION], [$POSTGIS_PGSQL_VERSION], [PostgreSQL server version])
AC_SUBST([POSTGIS_PGSQL_VERSION])
......@@ -1337,7 +1346,10 @@ if test "x$with_raster" != "xno"; then
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$LIBGDAL_CFLAGS"
CFLAGS_SAVE="$CFLAGS"
CFLAGS=""
CFLAGS=`"$PG_CONFIG" --cflags`
CC_SAVE="$CC"
CC=`"$PG_CONFIG" --cc`
LIBS_SAVE="$LIBS"
LIBS="$LIBGDAL_LDFLAGS"
......@@ -1366,6 +1378,7 @@ if test "x$with_raster" != "xno"; then
CPPFLAGS="$CPPFLAGS_SAVE"
CFLAGS="$CFLAGS_SAVE"
CC="$CC_SAVE"
LIBS="$LIBS_SAVE"
AC_SUBST([LIBGDAL_CFLAGS])
......
......@@ -19,6 +19,10 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#############################################################################
CC=@CC@
CFLAGS=-I../liblwgeom @CFLAGS@ @WARNFLAGS@
LDFLAGS = @LDFLAGS@
all: @RT_CORE_LIB@ @RT_PG_LIB@ @RT_LOADER@ @RT_POSTGIS_SQL@
corelib:
......
......@@ -65,6 +65,7 @@ LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@
LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@
LIBPROJ_CFLAGS=@PROJ_CPPFLAGS@
CC = @CC@
override CFLAGS := $(LIBLWGEOM_CFLAGS) @CFLAGS@
PG_CPPFLAGS+= @CPPFLAGS@ $(LIBGDAL_CFLAGS) $(LIBPGCOMMON_CFLAGS) $(LIBPROJ_CFLAGS) -I../rt_core
SHLIB_LINK_F = ../rt_core/librtcore.a $(LIBLWGEOM_LDFLAGS) $(LIBPGCOMMON_LDFLAGS) $(LIBGDAL_LDFLAGS) @SHLIB_LINK@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment