mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-11-21 13:15:45 +00:00
Differentiate between provider and consumer.
Introduce a new macro, CRYB_I_AM, which replaces CRYB_INIT for projects that provide Cryb components or extensions. Currently, the main difference is that they are not required to have the exact same PACKAGE_VERSION as the Cryb version that they use.
This commit is contained in:
parent
47547534d7
commit
a439adc68f
2 changed files with 20 additions and 6 deletions
|
@ -188,7 +188,7 @@ unset XFLAGS
|
||||||
# Components
|
# Components
|
||||||
#
|
#
|
||||||
|
|
||||||
CRYB_INIT
|
CRYB_I_AM
|
||||||
|
|
||||||
CRYB_LIB_PROVIDE([cipher], [core])
|
CRYB_LIB_PROVIDE([cipher], [core])
|
||||||
CRYB_LIB_PROVIDE([core], [])
|
CRYB_LIB_PROVIDE([core], [])
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
dnl -*- autoconf -*-
|
dnl -*- autoconf -*-
|
||||||
dnl
|
dnl
|
||||||
dnl Copyright (c) 2018 The University of Oslo
|
dnl Copyright (c) 2018 The University of Oslo
|
||||||
|
dnl Copyright (c) 2018 Dag-Erling Smørgrav
|
||||||
dnl All rights reserved.
|
dnl All rights reserved.
|
||||||
dnl
|
dnl
|
||||||
dnl Redistribution and use in source and binary forms, with or without
|
dnl Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -28,15 +29,28 @@ dnl OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
dnl SUCH DAMAGE.
|
dnl SUCH DAMAGE.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
m4_define([CRYB_MACROS_VERSION], [0.20180513])
|
m4_define([CRYB_MACROS_VERSION], [0.20181115])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl CRYB_INIT
|
dnl CRYB_INIT([version])
|
||||||
dnl ---------
|
dnl --------------------
|
||||||
dnl
|
dnl
|
||||||
dnl Initialize.
|
dnl Initialize (for consumers).
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN([CRYB_INIT], [
|
AC_DEFUN([CRYB_INIT], [
|
||||||
|
CRYB_VERSION=m4_default([$1], [CRYB_MACROS_VERSION])
|
||||||
|
AC_SUBST([CRYB_VERSION], [$CRYB_VERSION])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl
|
||||||
|
dnl CRYB_I_AM([version])
|
||||||
|
dnl --------------------
|
||||||
|
dnl
|
||||||
|
dnl Initialize (for providers).
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([CRYB_I_AM], [
|
||||||
|
CRYB_INIT([m4_default([$1], [$PACKAGE_VERSION])])
|
||||||
AC_ARG_ENABLE([all],
|
AC_ARG_ENABLE([all],
|
||||||
AS_HELP_STRING([--disable-all],
|
AS_HELP_STRING([--disable-all],
|
||||||
[disable all components]),
|
[disable all components]),
|
||||||
|
@ -118,7 +132,7 @@ AC_DEFUN([CRYB_RESOLVE], [
|
||||||
if test [x"$cryb_]comp[_needed" = x"yes"] && \
|
if test [x"$cryb_]comp[_needed" = x"yes"] && \
|
||||||
test [x"$enable_cryb_]comp[" != x"yes"] && \
|
test [x"$enable_cryb_]comp[" != x"yes"] && \
|
||||||
test [x"$ax_pc_cv_have_cryb_]comp[" = x""] ; then
|
test [x"$ax_pc_cv_have_cryb_]comp[" = x""] ; then
|
||||||
AX_PKG_CONFIG_REQUIRE([cryb-]comp, [$PACKAGE_VERSION])
|
AX_PKG_CONFIG_REQUIRE([cryb-]comp, [$CRYB_VERSION])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
AC_MSG_RESULT([ok])
|
AC_MSG_RESULT([ok])
|
||||||
|
|
Loading…
Reference in a new issue