aboutsummaryrefslogtreecommitdiffstats
path: root/XLIBS.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-09-12 19:28:02 +0200
committerBert <ber.t@gmx.com>2011-09-12 19:28:02 +0200
commitdad06c7561d6f0ca0ea8d7f104ade04ab0e051fd (patch)
treed2dd7b45aa80c926cc9b895c776c403b2366ea13 /XLIBS.c
parent32a65201bb2114790d98a73427fab80f41d94b97 (diff)
downloadnsxiv-dad06c7561d6f0ca0ea8d7f104ade04ab0e051fd.tar.zst
Much nicer handling of compile-time features
- *_SUPPORT enabled in config.h - XLIBS helper app prints lib flags needed for current settings
Diffstat (limited to 'XLIBS.c')
-rw-r--r--XLIBS.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/XLIBS.c b/XLIBS.c
new file mode 100644
index 0000000..14dc1e1
--- /dev/null
+++ b/XLIBS.c
@@ -0,0 +1,23 @@
+#define _POSIX_C_SOURCE 200112L
+#define _FEATURE_CONFIG
+
+#include <stdio.h>
+
+#include "config.h"
+
+int n = 0;
+
+inline void put_lib_flag(const char *flag, int needed) {
+ if (needed)
+ printf("%s%s", n++ ? " " : "", flag);
+}
+
+int main(int argc, char **argv) {
+ put_lib_flag("-lexif", EXIF_SUPPORT);
+ put_lib_flag("-lgif", GIF_SUPPORT);
+
+ if (n)
+ printf("\n");
+
+ return 0;
+}