134 |
[m4_divert_text([M4SH-INIT], [m4_default([$2], [$1])])])]) |
[m4_divert_text([M4SH-INIT], [m4_default([$2], [$1])])])]) |
135 |
|
|
136 |
|
|
137 |
|
# AS_REQUIRE_SHELL_FN(NAME-TO-CHECK, BODY-TO-EXPAND) |
138 |
|
# -------------------------------------------------- |
139 |
|
# BODY-TO-EXPAND is the body of a shell function to be emitted in the |
140 |
|
# M4SH-INIT section when expanded (required or not). Unlike other |
141 |
|
# xx_REQUIRE macros, BODY-TO-EXPAND is mandatory. |
142 |
|
# |
143 |
|
m4_define([AS_REQUIRE_SHELL_FN], |
144 |
|
[m4_provide_if([AS_SHELL_FN_$1], [], |
145 |
|
[m4_provide([AS_SHELL_FN_$1])m4_divert_text([M4SH-INIT], [$1() { |
146 |
|
$2 |
147 |
|
}])])]) |
148 |
|
|
149 |
|
|
150 |
# AS_SHELL_SANITIZE |
# AS_SHELL_SANITIZE |
151 |
# ----------------- |
# ----------------- |
152 |
# Try to be as Bourne and/or POSIX as possible. |
# Try to be as Bourne and/or POSIX as possible. |