~chaffra/+junk/trilinos

« back to all changes in this revision

Viewing changes to packages/belos/config/tac_arg_enable_can_use_package.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
 
# @synopsis TAC_ARG_ENABLE_CAN_USE_PACKAGE(PACKAGE_NAME, OPTIONAL_DEPENDENCY_NAME, AC_DEFINE, AM_CONDITIONAL, DEFAULT_BUILD, ALLOW_IMPLICIT_ENABLE, HELP_STRING, IMPLICIT_HELP_STRING)
2
 
3
 
 
4
 
# Use this macro to facilitate definition of options related to other
5
 
# Trilinos packages that a package "can use" but does not depend on.
6
 
 
7
 
# This macro supports both explicit and implicit configure options.
8
 
# For example to build epetra support into nox (so that nox can call
9
 
# epetra) we can explicitly use the flag --enable-nox-epetra.  This
10
 
# requires the user to enable both packages and the support between
11
 
# them: --enable-nox --enable-epetra --enable-nox-epetra.       
12
 
 
13
 
# Some packages, to simplify build requirements, implicitly assume
14
 
# that epetra support in nox should be built if both --enable-nox and
15
 
# --enable-epetra are supplied.  Users can override this by using the
16
 
# explicit command --enable-nox-epetra.
17
 
 
18
 
# Usage:
19
 
#  TAC_ARG_ENABLE_CAN_USE_PACKAGE(PACKAGE_NAME, 
20
 
#                                 OPTIONAL_PACKAGE_DEPENDENCY_NAME, 
21
 
#                                 AC_DEFINE, 
22
 
#                                 AM_CONDITIONAL, 
23
 
#                                 ALLOW_IMPLICIT_ENABLE, 
24
 
#                                 HELP_STRING, 
25
 
#                                 IMPLICIT_HELP_STRING)
26
 
#
27
 
# Where:
28
 
# PACKAGE_NAME - Name of package currently being enabled.
29
 
# OPTIONAL_PACKAGE_DEPENDENCY_NAME - Name of optinal package support that 
30
 
#                                    will be built in.
31
 
# AC_DEFINE - Name of define that will be put in the 
32
 
#             <PackageName>_ConfigDef.h file.  Note that a "HAVE_" 
33
 
#             will be automatically prepended to the name.
34
 
# AM_CONDITIONAL - Variable that will be set in the makefiles by an 
35
 
#                  AM_CONDITIONAL call.
36
 
# ALLOW_IMPLICIT_ENABLE - This can be used to turn off implicit enable 
37
 
#                         support.  Takes a "yes/no" argument.
38
 
# HELP_STRING - Help string for configure option:
39
 
#               --enable-<PACKAGE_NAME>-<OPTIONAL_PACKAGE_DEPENDENCY_NAME>
40
 
# IMPLICIT_HELP_STRING - Help string for implicit configure option:
41
 
#               --enable-<OPTIONAL_PACKAGE_DEPENDENCY_NAME>
42
 
43
 
# For example, to force explicit configuration of epetra support in nox:
44
 
45
 
#  TAC_ARG_ENABLE_EXPLICIT_CAN_USE_PACKAGE(nox, epetra, NOX_EPETRA, 
46
 
#                                          NOX_USING_EPETRA, no, 
47
 
#                                          [Builds epetra support into nox.], 
48
 
#                                          [DOES NOTHING!])
49
 
50
 
# To allow both implicit and explicit configuration of epetra support in nox:
51
 
#
52
 
# TAC_ARG_ENABLE_EXPLICIT_CAN_USE_PACKAGE(nox, epetra, NOX_EPETRA, 
53
 
# NOX_USING_EPETRA, no, yes, 
54
 
# [Builds epetra support in nox.], 
55
 
# [Builds epetra support in nox.  Can be overridden with --enable-nox-epetra.])
56
 
#
57
 
# Results of calling this file:
58
 
#  1. An AM_CONDITIONAL will be set for the AM_CONDITIONAL argument defined
59
 
#     above.
60
 
#  2. An AC_DEFINE of the form: HAVE_<AC_DEFINE> where AC_DEFINE is the 
61
 
#     argument defined above.
62
 
#
63
 
# @author Roger Pawlowski <rppawlo@sandia.gov>
64
 
# Based on original verison by Jim Willenbring.
65
 
#
66
 
AC_DEFUN([TAC_ARG_ENABLE_CAN_USE_PACKAGE],
67
 
[
68
 
 
69
 
dnl Check for implicit enabling of optional package  
70
 
AC_ARG_ENABLE([$2],
71
 
AC_HELP_STRING([--enable-$2],[$7]),
72
 
ac_cv_implicit_use_$2=$enableval, 
73
 
ac_cv_implicit_use_$2=no)
74
 
 
75
 
dnl If implicit enabling is used, set that as teh default
76
 
if test "X$5" != "Xno"; then
77
 
  ac_cv_$1_using_$2_default=$ac_cv_implicit_use_$2
78
 
else
79
 
  ac_cv_$1_using_$2_default=no
80
 
fi
81
 
 
82
 
AC_ARG_ENABLE([$1-$2],
83
 
AC_HELP_STRING([--enable-$1-$2],[$6]),
84
 
ac_cv_use_$2=$enableval, 
85
 
ac_cv_use_$2=$ac_cv_$1_using_$2_default)
86
 
 
87
 
AC_MSG_CHECKING(whether to build optional [$2] dependent code in [$1])
88
 
 
89
 
if test "X$ac_cv_use_$2" != "Xno"; then
90
 
  AC_MSG_RESULT(yes)
91
 
  AC_DEFINE([HAVE_$3],1,[Define if want to build with $1 enabled])
92
 
else
93
 
  AC_MSG_RESULT(no)
94
 
fi
95
 
 
96
 
AM_CONDITIONAL($4, test "X$ac_cv_use_$2" = "Xyes")
97
 
 
98
 
])