diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-02-06 14:49:21 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-02-06 15:58:21 +0000 |
commit | 7b52d33d86b23d663adb585a32a411e658d5a4c9 (patch) | |
tree | ac6a0d457644494713df3a2faac8d23b20cb0c63 /configure.ac | |
parent | 2b6f01b0085e10b4644b672ef03b6120b1927911 (diff) | |
download | libepoxy-7b52d33d86b23d663adb585a32a411e658d5a4c9.tar.gz |
Encode Epoxy capabilities into the pkg-config file
Since Epoxy can be built with different platform-specific API, having a
way for dependent projects to discover those capabilities without
necessarily crashing the minute they attempt to use them is a good
feature to have.
We strongly direct library and application developers to use pkg-config
in order to use Epoxy, so it makes sense to add variables to the
epoxy.pc file that can be easily extracted at configuration time.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 283e8c2..51c8ea4 100644 --- a/configure.ac +++ b/configure.ac @@ -205,6 +205,15 @@ AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes) PKG_CHECK_MODULES(GL, [gl], [gl=yes], [gl=no]) +# Variables for the pkg-config file; AC_SUBST does not do `test` substitutions, +# so we need to specify the boolean values here +AS_IF([test x$build_glx = xyes], [epoxy_has_glx=1], [epoxy_has_glx=0]) +AS_IF([test x$build_egl = xyes], [epoxy_has_egl=1], [epoxy_has_egl=0]) +AS_IF([test x$build_wgl = xyes], [epoxy_has_wgl=1], [epoxy_has_wgl=0]) +AC_SUBST(epoxy_has_glx) +AC_SUBST(epoxy_has_egl) +AC_SUBST(epoxy_has_wgl) + AC_CONFIG_FILES([ epoxy.pc Makefile |