| 1 |
dnl |
| 2 |
dnl Copyright (C) 1996-2026 Free Software Foundation, Inc. |
| 3 |
dnl |
| 4 |
dnl This file is part of GNU Inetutils. |
| 5 |
dnl |
| 6 |
dnl GNU Inetutils is free software: you can redistribute it and/or modify |
| 7 |
dnl it under the terms of the GNU General Public License as published by |
| 8 |
dnl the Free Software Foundation, either version 3 of the License, or (at |
| 9 |
dnl your option) any later version. |
| 10 |
dnl |
| 11 |
dnl GNU Inetutils is distributed in the hope that it will be useful, but |
| 12 |
dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
dnl General Public License for more details. |
| 15 |
dnl |
| 16 |
dnl You should have received a copy of the GNU General Public License |
| 17 |
dnl along with this program. If not, see `http://www.gnu.org/licenses/'. |
| 18 |
|
| 19 |
dnl Written by Miles Bader. |
| 20 |
|
| 21 |
dnl IU_RESULT_ACTIONS -- generate shell code for the result of a test |
| 22 |
dnl $1 -- CVAR -- cache variable to check |
| 23 |
dnl $2 -- NAME -- if not empty, used to generate a default value TRUE: |
| 24 |
dnl `AC_DEFINE(HAVE_NAME)' |
| 25 |
dnl $2 -- TRUE -- what to do if the CVAR is `yes' |
| 26 |
dnl $3 -- FALSE -- what to do otherwise; defaults to `:' |
| 27 |
dnl |
| 28 |
AC_DEFUN([IU_RESULT_ACTIONS], [ |
| 29 |
[if test "$$1" = yes; then |
| 30 |
]ifelse([$3], , |
| 31 |
[AC_DEFINE(HAVE_]translit($2, [a-z ./<>], [A-Z___])[, 1, |
| 32 |
[Define to 1 if ]translit($2, [a-z ./<>], [A-Z___])[ exists])], |
| 33 |
[$3])[ |
| 34 |
else |
| 35 |
]ifelse([$4], , [:], [$4])[ |
| 36 |
fi]])dnl |