[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ax_prog_python.m4
From: |
Dustin Mitchell |
Subject: |
ax_prog_python.m4 |
Date: |
Thu, 24 Jul 2003 17:20:33 -0500 |
User-agent: |
Mutt/1.4.1i |
I noticed a significant lack of Python support in the ac macro archive.
So here's the first of two macros I use. Let me know what you think.
--snip--
dnl @synopsis AX_PROG_PYTHON
dnl
dnl Locates an installed Python binary. Accepts --with-python, and failing
dnl that searches for python in the path. If python is found, $PYTHON is
dnl set to the full path of the binary; otherwise, nothing is changed.
dnl
dnl Example:
dnl
dnl AX_PROG_PYTHON
dnl if test -z "$PYTHON"
dnl then
dnl AC_MSG_ERROR("Python executable not found")
dnl fi
dnl
dnl @author Dustin Mitchell <address@hidden>
AC_DEFUN([AX_PROG_PYTHON],
[
AC_MSG_CHECKING(for --with-python)
AC_ARG_WITH(python,
AC_HELP_STRING([--with-python=PYTHON],
[absolute path name of Python executable]),
[
if test -f $withval -a -x $withval;
then
AC_MSG_RESULT($withval)
PYTHON="$withval"
AC_SUBST(PYTHON)
else
AC_MSG_RESULT($withval is not executable)
fi
], [
AC_MSG_RESULT(no)
])
# if it's not found, check the paths.
if test -z "$PYTHON"
then
AC_PATH_PROGS(PYTHON, [python2.2 python])
AC_SUBST(PYTHON)
fi
])
--snip--
Dustin
--
Dustin Mitchell
address@hidden/address@hidden
http://people.cs.uchicago.edu/~dustin/
- ax_prog_python.m4,
Dustin Mitchell <=