aboutsummaryrefslogtreecommitdiff
path: root/m4/mhd_check_func.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/mhd_check_func.m4')
-rw-r--r--m4/mhd_check_func.m420
1 files changed, 10 insertions, 10 deletions
diff --git a/m4/mhd_check_func.m4 b/m4/mhd_check_func.m4
index cc5b3735..42aefd86 100644
--- a/m4/mhd_check_func.m4
+++ b/m4/mhd_check_func.m4
@@ -37,24 +37,24 @@
37# 37#
38# LICENSE 38# LICENSE
39# 39#
40# Copyright (c) 2019 Karlson2k (Evgeny Grin) <k2k@narod.ru> 40# Copyright (c) 2019-2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
41# 41#
42# Copying and distribution of this file, with or without modification, are 42# Copying and distribution of this file, with or without modification, are
43# permitted in any medium without royalty provided the copyright notice 43# permitted in any medium without royalty provided the copyright notice
44# and this notice are preserved. This file is offered as-is, without any 44# and this notice are preserved. This file is offered as-is, without any
45# warranty. 45# warranty.
46 46
47#serial 2 47#serial 3
48 48
49AC_DEFUN([MHD_CHECK_FUNC],[dnl 49AC_DEFUN([MHD_CHECK_FUNC],[dnl
50 AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifblank, m4_ifnblank 50 AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifblank, m4_ifnblank
51 m4_ifblank(m4_translit([$1],[()],[ ]), [m4_fatal([First macro argument must not be empty])])dnl 51 m4_ifblank(m4_translit($1,[()],[ ]), [m4_fatal([First macro argument must not be empty])])dnl
52 m4_ifblank([$3], [m4_fatal([Third macro argument must not be empty])])dnl 52 m4_ifblank($3, [m4_fatal([Third macro argument must not be empty])])dnl
53 m4_bmatch(m4_normalize([$1]), [\s],dnl 53 m4_bmatch(m4_normalize($1), [\s],dnl
54 [m4_fatal([First macro argument must not contain whitespaces])])dnl 54 [m4_fatal([First macro argument must not contain whitespaces])])dnl
55 m4_if(m4_index([$3], m4_normalize(m4_translit([$1],[()],[ ]))), [-1], dnl 55 m4_if(m4_index($3, m4_normalize(m4_translit($1,[()],[ ]))), [-1], dnl
56 [m4_fatal([CHECK_CODE parameter (third macro argument) does not contain ']m4_normalize([$1])[' token])])dnl 56 [m4_fatal([CHECK_CODE parameter (third macro argument) does not contain ']m4_normalize($1)[' token])])dnl
57 AS_VAR_PUSHDEF([cv_Var], [mhd_cv_func_]m4_bpatsubst(m4_normalize(m4_translit([$1],[()],[ ])),[[^a-zA-Z0-9]],[_]))dnl 57 AS_VAR_PUSHDEF([cv_Var], [mhd_cv_func_]m4_bpatsubst(m4_normalize(m4_translit($1,[()],[ ])),[[^a-zA-Z0-9]],[_]))dnl
58 dnl 58 dnl
59 AC_CACHE_CHECK([for function $1], [cv_Var], 59 AC_CACHE_CHECK([for function $1], [cv_Var],
60 [dnl 60 [dnl
@@ -71,8 +71,8 @@ AC_DEFUN([MHD_CHECK_FUNC],[dnl
71 ])dnl 71 ])dnl
72 ]) 72 ])
73 AS_VAR_IF([cv_Var], ["yes"], 73 AS_VAR_IF([cv_Var], ["yes"],
74 [AC_DEFINE([[HAVE_]]m4_bpatsubst(m4_toupper(m4_normalize(m4_translit([$1],[()],[ ]))),[[^A-Z0-9]],[_]), 74 [AC_DEFINE([[HAVE_]]m4_bpatsubst(m4_toupper(m4_normalize(m4_translit($1,[()],[ ]))),[[^A-Z0-9]],[_]),
75 [1], [Define to 1 if you have the `]m4_normalize(m4_translit([$1],[()],[ ]))[' function.]) 75 [1], [Define to 1 if you have the `]m4_normalize(m4_translit($1,[()],[ ]))[' function.])
76 m4_n([$4])dnl 76 m4_n([$4])dnl
77 ], [$5]) 77 ], [$5])
78 AS_VAR_POPDEF([cv_Var])dnl 78 AS_VAR_POPDEF([cv_Var])dnl