AC_SUBST([SFCGAL])
AC_SUBST([HAVE_SFCGAL])
+
+
dnl ===========================================================================
dnl Detect gettext
dnl ===========================================================================
fi dnl }
+
+
dnl ===========================================================================
dnl Detect GTK+2.0 for GUI
dnl ===========================================================================
AC_DEFINE_UNQUOTED([POSTGIS_USE_STATS], [1], [Enable use of ANALYZE statistics])
-CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS $SFCGAL_CPPFLAGS $JSON_CPPFLAGS $CPPFLAGS"
+CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS $SFCGAL_CPPFLAGS $JSON_CPPFLAGS $PCRE_CPPFLAGS $CPPFLAGS"
dnl AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS])
-SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS $SFCGAL_LDFLAGS"
+SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS $SFCGAL_LDFLAGS $PCRE_LDFLAGS"
AC_SUBST([SHLIB_LINK])
dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK])
RT_MAKEFILE_LIST="raster/Makefile"
fi
+dnl ====================================
+dnl address standardizer stuff
+dnl ====================================
+AC_ARG_WITH([address_standardizer],
+ [AS_HELP_STRING([--without-address_standardizer],
+ [Disable the address_standardizer extension])],
+ [], [])
+
+if test "x$address_standardizer" != "xno"; then
+ dnl ===========================================================================
+ dnl Detect the version of PCRE installed
+ dnl ===========================================================================
+ LDFLAGS="$LDFLAGS_SAVE"
+ CFLAGS="$CFLAGS_SAVE"
+
+ CHECK_PCRE=yes
+ HAVE_PCRE=no
+ ADDRESS_STANDARDIZER="address_standardizer"
+ AC_ARG_WITH([pcredir],
+ [AS_HELP_STRING([--with-pcredir=PATH], [specify the PCRE installation directory])],
+ [PCREDIR="$withval"], [PCREDIR=""])
+
+ if test ! "x$PCREDIR" = "x"; then
+ dnl Make sure that the directory exists
+ if test "x$PCREDIR" = "xyes"; then
+ AC_MSG_ERROR([you must specify a parameter to --with-pcredir, e.g. --with-pcredir=/path/to])
+ else
+ if test -d "$PCREDIR"; then
+ AC_MSG_RESULT([Using user-specified PCRE directory: $PCREDIR])
+
+ dnl Add the include directory to PCRE_CPPFLAGS
+ PCRE_CPPFLAGS="-I$PCREDIR/include"
+ PCRE_LDFLAGS="-L$PCREDIR/lib"
+ else
+ AC_MSG_ERROR([the --with-pcredir directory "$PCREDIR" cannot be found])
+ fi
+ fi
+ fi
+
+
+ dnl Check that we can find the pcre.h header file
+ CPPFLAGS_SAVE="$CPPFLAGS"
+ CPPFLAGS="$PCRE_CPPFLAGS"
+
+ AC_CHECK_HEADER([pcre.h], [HAVE_PCRE=yes], [ADDRESS_STANDARDIZER=""])
+ AC_SUBST([PCRE])
+ AC_SUBST([HAVE_PCRE])
+ AC_SUBST([ADDRESS_STANDARDIZER])
+
+ dnl Return the PCRE version number
+ AC_DEFINE_UNQUOTED([PCRE_VERSION], [$PCRE_VERSION], [PCRE library version])
+ AC_SUBST([PCRE_VERSION])
+ CPPFLAGS="$CPPFLAGS_SAVE"
+
+ AC_SUBST([PCRE_CPPFLAGS])
+ AC_SUBST([PCRE_LDFLAGS])
+
+
+
+else
+ ADDRESS_STANDARDIZER=""
+ AC_SUBST([ADDRESS_STANDARDIZER])
+ AC_MSG_RESULT([ADDRESS_STANDARDIZER support: disabled])
+fi
+
+
dnl ===========================================================================
dnl See if we have the requirements for building the extensions, namely
AC_MSG_RESULT([ Libxml2 config: ${XML2CONFIG}])
AC_MSG_RESULT([ Libxml2 version: ${POSTGIS_LIBXML2_VERSION}])
AC_MSG_RESULT([ JSON-C support: ${HAVE_JSON}])
+AC_MSG_RESULT([ PCRE support: ${HAVE_PCRE}])
AC_MSG_RESULT([ PostGIS debug level: ${POSTGIS_DEBUG_LEVEL}])
AC_MSG_RESULT([ Perl: ${PERL}])
AC_MSG_RESULT()
else
AC_MSG_RESULT([ SFCGAL support: disabled])
fi
+
+if test "x$ADDRESS_STANDARDIZER" = "xaddress_standardizer"; then
+ AC_MSG_RESULT([ Address Standardizer support: enabled])
+else
+ AC_MSG_RESULT([ Address Standardizer support: disabled])
+fi
AC_MSG_RESULT()
AC_MSG_RESULT([ -------- Documentation Generation -------- ])
AC_MSG_RESULT([ xsltproc: ${XSLTPROC}])