From dad06c7561d6f0ca0ea8d7f104ade04ab0e051fd Mon Sep 17 00:00:00 2001 From: Bert Date: Mon, 12 Sep 2011 19:28:02 +0200 Subject: Much nicer handling of compile-time features - *_SUPPORT enabled in config.h - XLIBS helper app prints lib flags needed for current settings --- XLIBS.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 XLIBS.c (limited to 'XLIBS.c') 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 + +#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; +} -- cgit v1.2.3-54-g00ecf