RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES configure.ac

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Tue 26 Jun 2007 - 20:47:21 CEST
Message-Id: <20070626184721.7930D3484E0@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: rpm                              Date:   26-Jun-2007 20:47:21
  Branch: HEAD                             Handle: 2007062619472100

  Modified files:
    rpm                     CHANGES configure.ac

  Log:
    Use explicit enable/disable with --with-python/--without-python for
    Python API, too. Remove version checks for ancient Python versions and
    instead allow it to find an unversioned Python 2.x API, too.

  Summary:
    Revision    Changes     Path
    1.1400      +1  -0      rpm/CHANGES
    2.141       +45 -70     rpm/configure.ac
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1399 -r1.1400 CHANGES
  --- rpm/CHANGES	26 Jun 2007 18:19:07 -0000	1.1399
  +++ rpm/CHANGES	26 Jun 2007 18:47:21 -0000	1.1400
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - rse: use explicit enable/disable of Perl and Python APIs
       - rse: cleanup elf(3) API related Autoconf glue
       - rse: use --enable-maintainer-mode to enable Automake rebuilds for maintainers only
       - rse: cleanup Automake specifications replace old-style INCLUDES with AM_CPPFLAGS
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.140 -r2.141 configure.ac
  --- rpm/configure.ac	26 Jun 2007 18:31:33 -0000	2.140
  +++ rpm/configure.ac	26 Jun 2007 18:47:21 -0000	2.141
  @@ -616,7 +616,7 @@
   ])
   AC_SUBST(WITH_SELINUX_LIB)
   
  -dnl # auto-detect whether Perl bindings should be built.
  +dnl # optional Perl language bindings
   WITH_PERL_SUBDIR=""
   WITH_PERL_SUBPACKAGE=0
   AC_ARG_WITH(perl, AS_HELP_STRING([--with-perl], [build with RPM Perl language bindings]), [
  @@ -628,77 +628,52 @@
   AC_SUBST(WITH_PERL_SUBDIR)
   AC_SUBST(WITH_PERL_SUBPACKAGE)
   
  -dnl # auto-detect which Python bindings should be built.
  -withval=auto
  -AC_ARG_WITH(python, AS_HELP_STRING([--with-python], [build with RPM Python language bindings]))
  -WITH_PYTHON_VERSION=$withval
  -if test $withval = auto ; then
  -AC_MSG_CHECKING(for python 2.5)
  -AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <python2.5/Python.h>
  -main() {
  -  exit(strncmp("2.5", PY_VERSION, 3));
  -} ]])],[withval=yes],[withval=no],[withval=yes])
  -  AC_MSG_RESULT($withval)
  -  if test $withval = yes ; then
  -    WITH_PYTHON_VERSION="2.5"
  -  else
  -      
  -  AC_MSG_CHECKING(for python 2.4)
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <python2.4/Python.h>
  -  main() {
  -    exit(strncmp("2.4", PY_VERSION, 3));
  -  } ]])],[withval=yes],[withval=no],[withval=yes])
  -    AC_MSG_RESULT($withval)
  -    if test $withval = yes ; then
  -      WITH_PYTHON_VERSION="2.4"
  -    else
  -      
  -    AC_MSG_CHECKING(for python 2.3)
  -    AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <python2.3/Python.h>
  -    main() {
  -      exit(strncmp("2.3", PY_VERSION, 3));
  -    } ]])],[withval=yes],[withval=no],[withval=yes])
  -      AC_MSG_RESULT($withval)
  -      if test $withval = yes ; then
  -        WITH_PYTHON_VERSION="2.3"
  -      else
  -      
  -        AC_MSG_CHECKING(for python 2.2)
  -        AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <python2.2/Python.h>
  -      main() {
  -        exit(strncmp("2.2", PY_VERSION, 3));
  -      } ]])],[withval=yes],[withval=no],[withval=yes])
  -        AC_MSG_RESULT($withval)
  -        if test $withval = yes ; then
  -          WITH_PYTHON_VERSION="2.2"
  -        else
  -      
  -          AC_MSG_CHECKING(for python 1.5.2)
  -          AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <python1.5/Python.h>
  -      main() {
  -        exit(strcmp("1.5.2", PY_VERSION));
  -      } ]])],[withval=yes],[withval=no],[withval=yes])
  -          AC_MSG_RESULT($withval)
  -          if test $withval = yes ; then
  -            WITH_PYTHON_VERSION="1.5"
  -          fi
  +dnl # optional Python language bindings
  +WITH_PYTHON_SUBDIR=""
  +WITH_PYTHON_SUBPACKAGE=0
  +WITH_PYTHON_VERSION=""
  +AC_ARG_WITH(python, AS_HELP_STRING([--with-python], [build with RPM Python language bindings]), [
  +    if test ".$withval" != .no; then
  +        AC_MSG_CHECKING([for Python 2.5 API])
  +        AC_RUN_IFELSE([AC_LANG_SOURCE(
  +        [[#include <python2.5/Python.h>
  +           main() { exit(strncmp("2.5", PY_VERSION, 3)); } ]])
  +        ], [
  +           WITH_PYTHON_VERSION="2.5"
  +           AC_MSG_RESULT(yes)
  +        ], [ 
  +           AC_MSG_RESULT(no)
  +        ])
  +        if test ".$WITH_PYTHON_VERSION" = .; then
  +            AC_MSG_CHECKING([for Python 2.4 API])
  +            AC_RUN_IFELSE([AC_LANG_SOURCE(
  +            [[#include <python2.4/Python.h>
  +               main() { exit(strncmp("2.4", PY_VERSION, 3)); } ]])
  +            ], [
  +               WITH_PYTHON_VERSION="2.4"
  +               AC_MSG_RESULT(yes)
  +            ], [ 
  +               AC_MSG_RESULT(no)
  +            ])
  +            if test ".$WITH_PYTHON_VERSION" = .; then
  +                AC_MSG_CHECKING([for Python 2.x API])
  +                AC_RUN_IFELSE([AC_LANG_SOURCE(
  +                [[#include <python/Python.h>
  +                   main() { exit(strncmp("2.", PY_VERSION, 2)); } ]])
  +                ], [
  +                   WITH_PYTHON_VERSION=""
  +                   AC_MSG_RESULT(yes)
  +                ], [ 
  +                   AC_MSG_RESULT(no)
  +                ])
  +            fi
  +        fi
  +        if test ".$WITH_PYTHON_VERSION" != .; then
  +            WITH_PYTHON_SUBDIR=python
  +            WITH_PYTHON_SUBPACKAGE=1
           fi
  -      fi
       fi
  -  fi
  -fi
  -if test "$WITH_PYTHON_VERSION" != no ; then
  -  WITH_PYTHON_SUBDIR=python
  -  WITH_PYTHON_SUBPACKAGE=1
  -else
  -  WITH_PYTHON_SUBDIR=
  -  WITH_PYTHON_SUBPACKAGE=0
  -fi
  +])
   AC_SUBST(WITH_PYTHON_SUBDIR)
   AC_SUBST(WITH_PYTHON_SUBPACKAGE)
   AC_SUBST(WITH_PYTHON_VERSION)
  @@ .
Received on Tue Jun 26 20:47:21 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.