1
dnl @synopsis TAC_ARG_ENABLE_FEATURE_SUB(FEATURE_NAME, SUB_FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME, DEFAULT_VAL)
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 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(feature, sub, [Configure and build feature-sub], FEATURE_SUB, yes)
15
dnl Test for --enable-${FEATURE_NAME} and set to DEFAULT_VAL value if feature not specified.
16
dnl Also calls AC_DEFINE to define HAVE_${HAVE_NAME} if value is not equal to "no"
18
dnl Use this macro to help defining whether or not optional
19
dnl features* should compiled. For example:
21
dnl TAC_ARG_ENABLE_FEATURE(epetra, [Configure and build epetra], EPETRA, yes)
23
dnl will test for --enable-epetra when configure is run. If it is defined
24
dnl and not set to "no" or not defined (default is "yes") then HAVE_EPETRA will
25
dnl be defined, if --enable-epetra is defined to be "no", HAVE_EPETRA will not
28
dnl *NOTE: epetra, aztecoo, komplex, ifpack, and other software found in
29
dnl subdirectories of Trilinos/packages are "packages" in their own right.
30
dnl However, these packages are also "features" of the larger package
31
dnl "Trilinos". Therefore, when configuring from the Trilinos directory,
32
dnl it is appropriate to refer to these software packages as "features".
34
dnl This file was based on tac_arg_enable_package.m4 by Jim Willenbring
35
dnl @author Ken Stanley <ksstanl@sandia.gov>
37
AC_DEFUN([TAC_ARG_ENABLE_FEATURE_SUB],
39
AC_ARG_ENABLE([$1-$2],
40
AC_HELP_STRING([--enable-$1-$2],[$3 (default is [$5])]),
41
ac_cv_use_$1_$2=$enableval, ac_cv_use_$1_$2=$5)
43
AC_MSG_CHECKING(whether to use [$1-$2])
45
if test "X$ac_cv_use_$1_$2" != "Xno"; then
47
AC_DEFINE([HAVE_$4],,[Define if want to build $1-$2])