[PATCH] Warn about builds with missing features

subsurface at henrik.synth.no subsurface at henrik.synth.no
Sun Apr 14 07:41:38 PDT 2013


From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>

I think it makes sense to warn when Subsurface has been built
without all features enabled.  We could consider making
these features mandatory instead.

Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---
 main.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/main.c b/main.c
index 3c0ea73..75be64a 100644
--- a/main.c
+++ b/main.c
@@ -310,6 +310,23 @@ int main(int argc, char **argv)
 	gboolean no_filenames = TRUE;
 	const char *path;
 
+#if !defined(LIBZIP) || !defined(XSLT) || !defined(SQLITE3) || !HAVE_OSM_GPS_MAP
+	printf(_("The following features are disabled in this build: "));
+#ifndef LIBZIP
+	printf("libzip ");
+#endif
+#ifndef XSLT
+	printf("XSLT ");
+#endif
+#ifndef SQLITE3
+	printf("SQLite ");
+#endif
+#if !HAVE_OSM_GPS_MAP
+	printf("OsmGpsMap ");
+#endif
+	printf("\n");
+#endif
+
 	/* set up l18n - the search directory needs to change
 	 * so that it uses the correct system directory when
 	 * subsurface isn't run from the local directory */
-- 
1.8.1.3



More information about the subsurface mailing list