1
dnl @synopsis TAC_ARG_ENABLE_FEATURE_SUB_CHECK(FEATURE_NAME, SUB_FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME)
3
dnl This hack gets around the fact that TAC_ARG_ENABLE_FEATURE does not support underscores
4
dnl in its feature names. TAC_ARG_ENABLE_FEATURE_SUB_CHECK allows exactly one underscore. Not great,
5
dnl but arguably better than supporting no underscores.
7
dnl TAC_ARG_ENABLE_FEATURE(feature-sub, [Configure and build feature-sub], FEATURE_SUB, yes)
8
dnl fails because tac_arg_enable_feature tests for ac_cv_use_feature-sub which gets
9
dnl rejected because the `-' is not allowed in variables. (AC_ARG_ENABLE sets ac_cv_use_feature_sub
10
dnl to avoid this problem.) Use:
12
dnl TAC_ARG_ENABLE_FEATURE_SUB_CHECK(feature, sub, [Configure and build feature-sub], FEATURE_SUB)
15
dnl This macro will test for --enable-${FEATURE_NAME}-${SUB_FEATURE_NAME} when configure is run.
16
dnl If it is defined and not set to "no" or not defined and --disable-${SUB_FEATURE_NAME} is not
17
dnl specified then HAVE_${HAVE_NAME} will be defined.
19
dnl *NOTE: This macro is designed for the use-case when there is an individual Trilinos package
20
dnl offering fine-grained control of a Trilinos option. This way, the individual package
21
dnl option is enabled, as long as the Trilinos option is not disabled. If the Trilinos option is
22
dnl disabled, then the user must enable each packages option individually. For instance:
24
dnl --disable-tests --enable-teuchos-tests
26
dnl *NOTE: epetra, aztecoo, komplex, ifpack, and other software found in
27
dnl subdirectories of Trilinos/packages are "packages" in their own right.
28
dnl However, these packages are also "features" of the larger package
29
dnl "Trilinos". Therefore, when configuring from the Trilinos directory,
30
dnl it is appropriate to refer to these software packages as "features".
32
dnl This file was based on tac_arg_enable_package.m4 by Jim Willenbring
33
dnl and tac_arg_enable_package_sub.m4 by Ken Stanley.
35
dnl @author Heidi Thornquist <hkthorn@sandia.gov>
37
AC_DEFUN([TAC_ARG_ENABLE_FEATURE_SUB_CHECK],
39
AC_ARG_ENABLE([$2],, ac_cv_use_$2=$enableval, ac_cv_use_$2=yes)
41
AC_ARG_ENABLE([$1-$2],
42
AC_HELP_STRING([--enable-$1-$2],[$3 (default is yes if --disable-$2 is not specified)]),
43
ac_cv_use_$1_$2=$enableval, ac_cv_use_$1_$2=${ac_cv_use_$2})
45
AC_MSG_CHECKING(whether to use [$1-$2])
47
if test "X$ac_cv_use_$1_$2" != "Xno"; then
49
AC_DEFINE([HAVE_$4],,[Define if want to build $1-$2])