1 dnl CLN_HEADER_GETVAL(NAME,FILE)
2 dnl Expand at autoconf time to the value of a "#define NAME" from the given
3 dnl FILE. The regexps here aren't very robust, but are enough for us.
4 dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
5 dnl (shamelessly ripped from GMP, and changed prefix to CL_).
7 define(CL_HEADER_GETVAL,
9 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
16 dnl The CLN version number, extracted from #defines at autoconf time.
18 AC_DEFUN([CL_GET_VERSION],
19 [CL_HEADER_GETVAL(CL_VERSION_$1,[include/cln/version.h])])
22 dnl The CLN library version number, extracted from #defines at autoconf time.
24 AC_DEFUN([CL_GET_LTVERSION],
25 [CL_HEADER_GETVAL(CL_LT_$1,[include/cln/version.h])])