From 65e94ffae271dc9ef75f5227d8ec647b1dd428bd Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 2 Aug 2024 15:36:38 +0200 Subject: wbg: use getopt() for option parsing, add help and version options --- wbg-features.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 wbg-features.h (limited to 'wbg-features.h') diff --git a/wbg-features.h b/wbg-features.h new file mode 100644 index 0000000..b11da92 --- /dev/null +++ b/wbg-features.h @@ -0,0 +1,47 @@ +#pragma once +#include + +static inline bool feature_png(void) +{ +#if defined(WBG_HAVE_PNG) && WBG_HAVE_PNG + return true; +#else + return false; +#endif +} + +static inline bool feature_jpg(void) +{ +#if defined(WBG_HAVE_JPG) && WBG_HAVE_JPG + return true; +#else + return false; +#endif +} + +static inline bool feature_webp(void) +{ +#if defined(WBG_HAVE_WEBP) && WBG_HAVE_WEBP + return true; +#else + return false; +#endif +} + +static inline bool feature_svg(void) +{ +#if defined(WBG_HAVE_SVG) && WBG_HAVE_SVG + return true; +#else + return false; +#endif +} + +static inline bool feature_jxl(void) +{ +#if defined(WBG_HAVE_JXL) && WBG_HAVE_JXL + return true; +#else + return false; +#endif +} -- cgit v1.2.3