diff options
author | hk57.kim <hk57.kim@samsung.com> | 2015-06-03 15:16:56 +0900 |
---|---|---|
committer | hk57.kim <hk57.kim@samsung.com> | 2015-06-03 15:16:56 +0900 |
commit | 4078c98a5d481778482f52d3aaf7a1777ffe6088 (patch) | |
tree | c18ae9d21e2b29c349231c5b61d742e9fca9c1d9 /acinclude.m4 | |
parent | cce6a0e298fac08c588204b085e7a807fa75813d (diff) | |
download | cairo-4078c98a5d481778482f52d3aaf7a1777ffe6088.tar.gz cairo-4078c98a5d481778482f52d3aaf7a1777ffe6088.tar.bz2 cairo-4078c98a5d481778482f52d3aaf7a1777ffe6088.zip |
Cairo 1.12.14
Change-Id: Ibc39e63896ec42cab29fbbbf615a46f2d58319a8
Signed-off-by: hk57.kim <hk57.kim@samsung.com>
Diffstat (limited to 'acinclude.m4')
-rwxr-xr-x | acinclude.m4 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100755 index 000000000..dcf54f935 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,55 @@ +dnl -*- mode: autoconf -*- + +dnl [m4_newline] didn't appear until autoconf 2.62 +m4_ifdef([m4_newline],,[m4_define([m4_newline],[ +])]) + +dnl These are not available in autoconf 2.59 + +m4_ifdef([m4_foreach_w],,[m4_define([m4_foreach_w], +[m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) + +m4_ifdef([AS_CASE],,[ +m4_define([_AS_CASE], +[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], + [$#], 1, [ *) $1 ;;], + [$#], 2, [ $1) m4_default([$2], [:]) ;;], + [ $1) m4_default([$2], [:]) ;; +$0(m4_shift2($@))])dnl +]) +m4_defun([AS_CASE], +[m4_ifval([$2$3], +[case $1 in +_AS_CASE(m4_shift($@)) +esac +])dnl +])# AS_CASE +]) + +m4_ifdef([m4_shift2],, [m4_define([m4_shift2], [m4_shift(m4_shift($@))])]) + + +dnl ========================================================================== + +dnl This has to be in acinclude.m4 as it includes other files + +dnl Parse Version.mk and declare m4 variables out of it +m4_define([CAIRO_PARSE_VERSION],dnl + m4_translit(dnl + m4_bpatsubst(m4_include(cairo-version.h), + [^.define \([a-zA-Z0-9_]*\) *\([0-9][0-9]*\)], + [[m4_define(\1, \2)]]), + [A-Z], [a-z])dnl +)dnl + +dnl ========================================================================== + +m4_pattern_forbid([^cr_]) + +dnl AC_AUTOCONF_VERSION was introduced in 2.62, so its definition works as +dnl a conditional on version >= 2.62. Older versions did not call +dnl m4_pattern_allow from AC_DEFINE and friends. To avoid lots of warnings we +dnl only forbid CAIRO_ if autoconf is recent enough. +m4_ifdef([AC_AUTOCONF_VERSION], +[m4_pattern_forbid([CAIRO])], +[m4_pattern_forbid([_CAIRO])]) |