| 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 Joel N. Weber II. |
| 20 |
|
| 21 |
AC_DEFUN([IU_ENABLE_FOO], |
| 22 |
[AC_ARG_ENABLE($1, AS_HELP_STRING([--disable-$1], [don't compile $1]), , |
| 23 |
[enable_]$1[=$enable_]$2) |
| 24 |
[if test "$enable_$1" = yes; then |
| 25 |
$1_BUILD=$1$EXEEXT |
| 26 |
$1_INSTALL_HOOK="install-$1-hook" |
| 27 |
else |
| 28 |
$1_BUILD='' |
| 29 |
$1_INSTALL_HOOK='' |
| 30 |
fi;] |
| 31 |
AC_SUBST([$1_BUILD]) |
| 32 |
AC_SUBST([$1_INSTALL_HOOK]) |
| 33 |
AC_SUBST([$1_PROPS]) |
| 34 |
AC_SUBST([enable_$1]) |
| 35 |
AM_CONDITIONAL([ENABLE_$1], test "$enable_$1" = yes) |
| 36 |
]) |
| 37 |
|
| 38 |
AC_DEFUN([IU_ENABLE_CLIENT], [IU_ENABLE_FOO($1, clients)]) |
| 39 |
AC_DEFUN([IU_ENABLE_SERVER], [IU_ENABLE_FOO($1, servers)]) |
| 40 |
|
| 41 |
AC_DEFUN([IU_DISABLE_TARGET], |
| 42 |
[enable_$1=no $1_BUILD='' $1_INSTALL_HOOK='' |
| 43 |
AM_CONDITIONAL([ENABLE_$1], test "$enable_$1" != no) |
| 44 |
]) |