1 /*
2    Copyright (C) 2015 - 2018 by Iris Morelle <shadowm2006@gmail.com>
3    Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2 of the License, or
8    (at your option) any later version.
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY.
11 
12    See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
17 #include <string>
18 #include <vector>
19 
20 namespace game_config
21 {
22 
23 enum LIBRARY_ID
24 {
25 	LIB_BOOST,
26 
27 	LIB_CRYPTO,
28 
29 	LIB_CAIRO,
30 	LIB_PANGO,
31 
32 	LIB_SDL,
33 	LIB_SDL_IMAGE,
34 	LIB_SDL_MIXER,
35 	LIB_SDL_TTF,
36 	LIB_PNG,
37 
38 	LIB_COUNT
39 };
40 
41 struct optional_feature
42 {
43 	std::string name;
44 	bool enabled;
45 
optional_featuregame_config::optional_feature46 	optional_feature(const char* n) : name(n), enabled(false) {}
47 };
48 
49 /**
50  * Return a localized features table.
51  */
52 std::vector<optional_feature> optional_features_table();
53 
54 /**
55  * Produce a plain-text report of features suitable for stdout/stderr.
56  */
57 std::string optional_features_report();
58 
59 /**
60  * Return the distribution channel identifier, or "Default" if missing.
61  */
62 std::string dist_channel_id();
63 
64 /**
65  * Retrieve the build-time version number of the given library.
66  */
67 const std::string& library_build_version(LIBRARY_ID lib);
68 
69 /**
70  * Retrieve the runtime version number of the given library.
71  */
72 const std::string& library_runtime_version(LIBRARY_ID lib);
73 
74 /**
75  * Retrieve the user-visible name for the given library.
76  */
77 const std::string& library_name(LIBRARY_ID lib);
78 
79 /**
80  * Produce a plain-text report of library versions suitable for stdout/stderr.
81  */
82 std::string library_versions_report();
83 
84 /**
85  * Produce a bug report-style info dump.
86  */
87 std::string full_build_report();
88 
89 } // end namespace game_config
90