~ubuntu-branches/ubuntu/intrepid/plplot/intrepid

« back to all changes in this revision

Viewing changes to cf/python.ac

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere
  • Date: 2006-11-04 10:19:34 UTC
  • mfrom: (2.1.8 edgy)
  • Revision ID: james.westby@ubuntu.com-20061104101934-mlirvdg4gpwi6i5q
Tags: 5.6.1-10
* Orphaning the package
* debian/control: Changed the maintainer to the Debian QA Group

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
dnl
21
21
dnl You should have received a copy of the GNU Library General Public License
22
22
dnl along with the file PLplot; if not, write to the Free Software
23
 
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
23
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
24
24
 
25
25
PL_ARG_ENABLE(python, [compile Python interface code], yes)
26
26
 
29
29
    ### AM_PATH_PYTHON, such that if python is not found, configure will
30
30
    ### not stop.
31
31
    pushdef([AC_MSG_ERROR],defn([AC_MSG_WARN]))
32
 
    AM_PATH_PYTHON(1.5)
 
32
    AM_PATH_PYTHON(2.1)
33
33
    AC_PYTHON_DEVEL
34
34
    popdef([AC_MSG_ERROR])
35
35
    if test -n "$PYTHON_VERSION" ; then
62
62
    fi
63
63
fi
64
64
 
 
65
PL_ARG_WITH(python-incdir, [User-specified path to the python header files], [])
65
66
if test "$enable_python" = "yes"; then
66
 
    if test -z "$PYTHON_INC_DIR" -o ! -d "$PYTHON_INC_DIR"; then
 
67
    if test -z "$with_python_incdir"; then
67
68
        incdirs="$prefix/include/python$PYTHON_VERSION \
68
 
                 /usr/include/python$PYTHON_VERSION"
69
 
        PL_FIND_INC(Python, PYTHON_INC_DIR, enable_python)
 
69
                 /usr/include/python$PYTHON_VERSION \
 
70
                 /Library/Frameworks/Python.framework/Versions/$PYTHON_VERSION/include/python$PYTHON_VERSION"
 
71
        PL_FIND_INC(Python, with_python_incdir, enable_python)
70
72
 
71
73
        if test "$enable_python" = no ; then
72
74
            AC_MSG_WARN([Header file for Python version $PYTHON_VERSION has not been found.])
73
75
            AC_MSG_WARN([This probably means that an appropriate Python])
74
76
            AC_MSG_WARN([development package needs to be installed.])
 
77
            with_python_incdir=default
75
78
        fi
76
 
 
77
 
    fi
78
 
 
79
 
# This needs to be a separate test in case PYTHON_INC_DIR is specified by the
 
79
    else
 
80
        AC_MSG_NOTICE("User-specified path to the python header files is $with_python_incdir")
 
81
    fi
 
82
    if test "$with_python_incdir" = "/usr/include"; then
 
83
        with_python_incdir=default
 
84
    fi
 
85
    PYTHONINCCMD=""
 
86
    PYTHONINCPATH=""
 
87
    PL_ADD_TO_INCS($with_python_incdir, PYTHONINCCMD, PYTHONINCPATH)
 
88
 
 
89
# This needs to be a separate test in case with_python_incdir is specified by the
80
90
# user, to pick up a particular version.  Numeric should be either in the same
81
 
# or a subdir of PYTHON_INC_DIR else version mismatch could occur.
 
91
# or a subdir of with_python_incdir else version mismatch could occur.
82
92
 
83
93
    if test "$enable_python" = "yes"; then
84
94
        incdirs="\
85
 
        $PYTHON_INC_DIR \
86
 
        $PYTHON_INC_DIR/Numeric"
87
 
        PL_FIND_INC(arrayobject, PYTHON_NUM_DIR, numeric_python)
 
95
        $with_python_incdir \
 
96
        $with_python_incdir/Numeric"
 
97
        PL_FIND_INC(arrayobject, numeric_incdir, numeric_python)
88
98
        if test "$numeric_python" = "no"; then
89
99
            AC_MSG_RESULT([plplot module needs Python numeric extension.])
90
100
            AC_MSG_RESULT([Setting enable_python to no])
91
101
            enable_python=no
 
102
            numeric_incdir=default
92
103
        fi
93
104
    fi
 
105
    NUMERICINCCMD=""
 
106
    NUMERICINCPATH=""
 
107
    PL_ADD_TO_INCS($numeric_incdir, NUMERICINCCMD, NUMERICINCPATH)
94
108
fi
95
109
 
96
 
AC_SUBST(PYTHON_INC_DIR)
97
 
AC_SUBST(PYTHON_NUM_DIR)
 
110
AC_SUBST(PYTHONINCCMD)
 
111
AC_SUBST(NUMERICINCCMD)
98
112
 
99
113
AM_CONDITIONAL(enable_python, [test "$enable_python" = yes])
100
114
# Needed to set up python linking hack for Mac OS X.