bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in AM_PATH_PYTHON ?


From: Patrick Guio
Subject: Bug in AM_PATH_PYTHON ?
Date: Fri, 23 Nov 2001 09:24:38 +0100 (CET)

Dear all,
I have updated my autoconf/automake/libtool package to
aclocal (GNU automake) 1.5a
autoconf (GNU Autoconf) 2.52g
automake (GNU automake) 1.5a
libtoolize (GNU libtool) 1.4c

and have written a short configure.in

AC_PREREQ(2.52g)
AC_INIT
AC_CONFIG_SRCDIR([hello.py.in])
AC_PROG_MAKE_SET()
AC_CANONICAL_TARGET()
SHELL=${CONFIG_SHELL-/bin/sh}
AC_SUBST(SHELL)
AM_INIT_AUTOMAKE(hello,1.0)
AM_PATH_PYTHON(2)
AC_CONFIG_FILES([hello.py], [chmod +x hello.py])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

I am running RH7.2 and have several python versions. The default "python"
is version 1.5 but there are in addition python2 and python2.1
all of them coming from rpm's.
The problem is that configure does not check all the possibilities as it
should do:

checking whether make sets ${MAKE}... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking for python... /usr/bin/python
checking if Python version >= 2... configure: error: too old

The $prefix/share/aclocal/python.m4 included in the local aclocal.m4 when
running aclocal contains a line

AC_PATH_PROG(PYTHON, python python2.1 python2.0 python1.6 python1.5)

which in configure gives something like

  # Extract the first word of "python python2.1 python2.0 python1.6 python1.5", 
so it can be a program name with args.
set dummy python python2.1 python2.0 python1.6 python1.5; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
 ...

which is definitly not a loop over the different python commands. For awk,
it looks like this

for ac_prog in gawk mawk nawk awk
do
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
....
done

Another comment is that maybe the command python2 could be tried since
some rpms contain the python2 command.

Sincerely
Patrick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]