~chaffra/+junk/trilinos

« back to all changes in this revision

Viewing changes to packages/WebTrilinos/config/ac_pkg_swig.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 Available from the GNU Autoconf Macro Archive at:
2
 
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_pkg_swig.html
3
 
dnl
4
 
AC_DEFUN([AC_PROG_SWIG],[
5
 
        if test -z "$SWIG"; then
6
 
                AC_PATH_PROG([SWIG],[swig])
7
 
        fi
8
 
        if test -z "$SWIG" ; then
9
 
                AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
10
 
                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
11
 
        else
12
 
            AC_MSG_NOTICE([SWIG executable is '$SWIG'])
13
 
            if test -n "$1" ; then
14
 
                AC_MSG_CHECKING([for SWIG version])
15
 
                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
16
 
                AC_MSG_RESULT([$swig_version])
17
 
                if test -n "$swig_version" ; then
18
 
                        # Calculate the required version number components
19
 
                        [required=$1]
20
 
                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
21
 
                        if test -z "$required_major" ; then
22
 
                                [required_major=0]
23
 
                        fi
24
 
                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
25
 
                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
26
 
                        if test -z "$required_minor" ; then
27
 
                                [required_minor=0]
28
 
                        fi
29
 
                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
30
 
                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
31
 
                        if test -z "$required_patch" ; then
32
 
                                [required_patch=0]
33
 
                        fi
34
 
                        # Calculate the available version number components
35
 
                        [available=$swig_version]
36
 
                        [available_major=`echo $available | sed 's/[^0-9].*//'`]
37
 
                        if test -z "$available_major" ; then
38
 
                                [available_major=0]
39
 
                        fi
40
 
                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
41
 
                        [available_minor=`echo $available | sed 's/[^0-9].*//'`]
42
 
                        if test -z "$available_minor" ; then
43
 
                                [available_minor=0]
44
 
                        fi
45
 
                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
46
 
                        [available_patch=`echo $available | sed 's/[^0-9].*//'`]
47
 
                        if test -z "$available_patch" ; then
48
 
                                [available_patch=0]
49
 
                        fi
50
 
                        if test $available_major -ne $required_major \
51
 
                                -o $available_minor -ne $required_minor \
52
 
                                -o $available_patch -lt $required_patch ; then
53
 
                                AC_MSG_WARN([SWIG version >= $1 is required.  You have $swig_version.  You should look at http://www.swig.org])
54
 
                                SWIG='echo "Error: SWIG version >= $1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
55
 
                        else
56
 
                                SWIG_LIB=`$SWIG -swiglib`
57
 
                                AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
58
 
                        fi
59
 
                else
60
 
                        AC_MSG_WARN([cannot determine SWIG version])
61
 
                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
62
 
                fi
63
 
            fi
64
 
        fi
65
 
        AC_SUBST([SWIG_LIB])
66
 
])
67
 
 
68
 
# SWIG_ENABLE_CXX()
69
 
#
70
 
# Enable SWIG C++ support.  This affects all invocations of $(SWIG).
71
 
AC_DEFUN([SWIG_ENABLE_CXX],[
72
 
        AC_REQUIRE([AC_PROG_SWIG])
73
 
        AC_REQUIRE([AC_PROG_CXX])
74
 
        SWIG="$SWIG -c++"
75
 
])
76
 
 
77
 
# SWIG_MULTI_MODULE_SUPPORT()
78
 
#
79
 
# Enable support for multiple modules.  This effects all invocations
80
 
# of $(SWIG).  You have to link all generated modules against the
81
 
# appropriate SWIG runtime library.  If you want to build Python
82
 
# modules for example, use the SWIG_PYTHON() macro and link the
83
 
# modules against $(SWIG_PYTHON_LIBS).
84
 
#
85
 
AC_DEFUN([SWIG_MULTI_MODULE_SUPPORT],[
86
 
        AC_REQUIRE([AC_PROG_SWIG])
87
 
#        SWIG="$SWIG -noruntime"
88
 
#        SWIG="$SWIG -c"
89
 
        SWIG="$SWIG"
90
 
])
91
 
 
92
 
# SWIG_PYTHON([use-shadow-classes = {no, yes}])
93
 
#
94
 
# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS),
95
 
# and $(SWIG_PYTHON_OPT) output variables.
96
 
#
97
 
# $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate
98
 
# code for Python.  Shadow classes are enabled unless the value of the
99
 
# optional first argument is exactly 'no'.  If you need multi module
100
 
# support (provided by the SWIG_MULTI_MODULE_SUPPORT() macro) use
101
 
# $(SWIG_PYTHON_LIBS) to link against the appropriate library.  It
102
 
# contains the SWIG Python runtime library that is needed by the type
103
 
# check system for example.
104
 
AC_DEFUN([SWIG_PYTHON],[
105
 
        AC_REQUIRE([AC_PROG_SWIG])
106
 
#        AC_REQUIRE([AC_PYTHON_DEVEL])
107
 
#        test "x$1" != "xno" || swig_shadow=" -noproxy"
108
 
#        AC_SUBST([SWIG_PYTHON_OPT],[-python$swig_shadow])
109
 
        AC_SUBST([SWIG_PYTHON_OPT],[-python])
110
 
        AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
111
 
])
112
 
 
113
 
 
114
 
dnl @synopsis AC_LIB_WAD
115
 
dnl
116
 
dnl This macro searches for installed WAD library.
117
 
dnl
118
 
AC_DEFUN([AC_LIB_WAD],
119
 
[
120
 
        AC_REQUIRE([AC_PYTHON_DEVEL])
121
 
        AC_ARG_ENABLE(wad,
122
 
        AC_HELP_STRING([--enable-wad], [enable wad module]),
123
 
        [
124
 
                case "${enableval}" in
125
 
                        no)     ;;
126
 
                        *)      if test "x${enableval}" = xyes;
127
 
                                then
128
 
                                        check_wad="yes"
129
 
                                fi ;;
130
 
                esac
131
 
        ], [])
132
 
 
133
 
        if test -n "$check_wad";
134
 
        then
135
 
                AC_CHECK_LIB(wadpy, _init, [WADPY=-lwadpy], [], $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS)
136
 
                AC_SUBST(WADPY)
137
 
        fi
138
 
])