RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ CHANGES configure.ac

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Sat 19 Jan 2008 - 15:07:08 CET
Message-ID: <20080119140708.GA82736@engelschall.com>
On Tue, Jan 15, 2008, Per Øyvind Karlsen wrote:

>     fix auto detection of install location for python bindings
> [...]
>    AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
>   -	[WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="${WITH_PYTHON_PREFIX}/include/python${WITH_PYTHON_VERSION}"])
>   +	[WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`"])
>    AC_ARG_WITH(python-lib-dir, AS_HELP_STRING([--with-python-lib-dir=DIR], [directory with Python library]),
>   -	[WITH_PYTHON_LIBDIR="$withval"], [WITH_PYTHON_LIBDIR="${WITH_PYTHON_PREFIX}/lib/python${WITH_PYTHON_VERSION}"])
>   +	[WITH_PYTHON_LIBDIR="$withval"], [WITH_PYTHON_LIBDIR="`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`"])
>    AC_SUBST(WITH_PYTHON_INCDIR)
>    AC_SUBST(WITH_PYTHON_LIBDIR)

This change is problematic: it runs Python also if no --with-python-*
is given at all. Because the 4th argument of AC_ARG_WITH() is run if no
option is given at all. I now moved this stuff into the --with-python
part to make sure python(1) is run only if Python is enabled.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Sat Jan 19 15:08:19 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.