]> granicus.if.org Git - postgis/commitdiff
Make SFCGAL version available in postgis_config.h.in
authorSandro Santilli <strk@keybit.net>
Tue, 16 Jun 2015 10:12:01 +0000 (10:12 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 16 Jun 2015 10:12:01 +0000 (10:12 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13675 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
postgis_config.h.in

index f5ea3d34d0f1d565d04de9290fba5f827cb3da91..fe9323750463d15e71a705b89a0c4aa4d4a56208 100644 (file)
@@ -661,6 +661,12 @@ if test "x$with_sfcgal" != "xno"; then
                SFCGAL_LDFLAGS=`$SFCGAL_CONFIG --libs`
                SFCGAL_CPPFLAGS=`$SFCGAL_CONFIG --cflags`" -DHAVE_SFCGAL"
 
+               SFCGAL_MAJOR_VERSION=`echo $SFCGAL_VERSION | cut -d. -f1 | sed 's/[[^0-9]]//g'`
+               SFCGAL_MINOR_VERSION=`echo $SFCGAL_VERSION | cut -d. -f2 | sed 's/[[^0-9]]//g'`
+               POSTGIS_SFCGAL_VERSION="$SFCGAL_MAJOR_VERSION$SFCGAL_MINOR_VERSION"
+               AC_DEFINE_UNQUOTED([POSTGIS_SFCGAL_VERSION], [$POSTGIS_SFCGAL_VERSION], [SFCGAL library version at build time])
+               AC_SUBST([POSTGIS_SFCGAL_VERSION])
+
                SFCGAL_STATIC=`$SFCGAL_CONFIG --static`
                if test "x$SFCGAL_STATIC" = "xON"; then
                        AC_MSG_WARN([The SFCGAL version found is not installed as a dynamic library.])
index 3d46de2a640ba03346a75fff9a687ac9a36e5acb..133270bf22332e9ff63a4acf332a2aa5db1a19e1 100644 (file)
 /* PostGIS library debug level (0=disabled) */
 #undef POSTGIS_DEBUG_LEVEL
 
+/* SFCGAL library version at buil time */
+#undef POSTGIS_SFCGAL_VERSION
+
 /* GDAL library version */
 #undef POSTGIS_GDAL_VERSION