~chaffra/+junk/trilinos

« back to all changes in this revision

Viewing changes to packages/phalanx/config/tac_arg_enable_feature_sub_check.m4

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme, Johannes Ring
  • Date: 2009-12-13 12:53:22 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091213125322-in0nrdjc55deqsw9
Tags: 10.0.3.dfsg-1
[Christophe Prud'homme]
* New upstream release

[Johannes Ring]
* debian/patches/libname.patch: Add prefix 'libtrilinos_' to all
  libraries. 
* debian/patches/soname.patch: Add soversion to libraries.
* debian/watch: Update download URL.
* debian/control:
  - Remove python-numeric from Build-Depends (virtual package).
  - Remove automake and autotools from Build-Depends and add cmake to
    reflect switch to CMake.
  - Add python-support to Build-Depends.
* debian/rules: 
  - Cleanup and updates for switch to CMake.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl @synopsis TAC_ARG_ENABLE_FEATURE_SUB_CHECK(FEATURE_NAME, SUB_FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME)
2
 
dnl
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.
6
 
dnl
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:
11
 
dnl 
12
 
dnl TAC_ARG_ENABLE_FEATURE_SUB_CHECK(feature, sub, [Configure and build feature-sub], FEATURE_SUB) 
13
 
dnl   instead.
14
 
dnl
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.
18
 
dnl
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:
23
 
dnl
24
 
dnl --disable-tests --enable-teuchos-tests
25
 
dnl
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".
31
 
dnl
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.
34
 
dnl
35
 
dnl @author Heidi Thornquist <hkthorn@sandia.gov>
36
 
dnl
37
 
AC_DEFUN([TAC_ARG_ENABLE_FEATURE_SUB_CHECK],
38
 
[
39
 
AC_ARG_ENABLE([$2],, ac_cv_use_$2=$enableval, ac_cv_use_$2=yes)
40
 
 
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})
44
 
 
45
 
AC_MSG_CHECKING(whether to use [$1-$2])
46
 
 
47
 
if test "X$ac_cv_use_$1_$2" != "Xno"; then
48
 
  AC_MSG_RESULT(yes)  
49
 
  AC_DEFINE([HAVE_$4],,[Define if want to build $1-$2])
50
 
else
51
 
  AC_MSG_RESULT(no)
52
 
fi
53
 
])
54