]> www.ginac.de Git - cln.git/blob - acinclude.m4
INSTALL.CMake: proper installation command
[cln.git] / acinclude.m4
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_).
6
7 define(CL_HEADER_GETVAL,
8 [patsubst(patsubst(
9 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
10 [^.*$1[         ]+],[]),
11 [[
12         ]*$],[])])
13 define(CL_GET_VERSION,
14 [CL_HEADER_GETVAL(CL_VERSION_$1,[include/cln/version.h])])
15 define(CL_GET_LTVERSION,
16 [CL_HEADER_GETVAL(CL_LT_$1,[include/cln/version.h])])
17