2
1

ola-0002-move-python-sub-check-to-configure.ac.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. commit 673a7602a6bf7a6aa8a8461ebd9362d59f6e21df
  2. Author: Yann E. MORIN <yann.morin.1998@free.fr>
  3. Date: Tue Jan 14 21:37:51 2014 +0100
  4. configure: move python sub-check to configure.ac
  5. We do not want to re-test the python name for each Python module
  6. we want to check for.
  7. Even if we only check for one Python module right now, this is
  8. good practice overall.
  9. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  10. ---
  11. Sent upstream, awaiting for response...
  12. diff --git a/config/ax_python_module.m4 b/config/ax_python_module.m4
  13. index bd70a06..96dd1ab 100644
  14. --- a/config/ax_python_module.m4
  15. +++ b/config/ax_python_module.m4
  16. @@ -25,11 +25,6 @@
  17. AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])
  18. AC_DEFUN([AX_PYTHON_MODULE],[
  19. - if test -z $PYTHON;
  20. - then
  21. - PYTHON="python"
  22. - fi
  23. - PYTHON_NAME=`basename $PYTHON`
  24. AC_MSG_CHECKING($PYTHON_NAME module: $1)
  25. $PYTHON -c "import $1" 2>/dev/null
  26. if test $? -eq 0;
  27. diff --git a/configure.ac b/configure.ac
  28. index 1efedf1..5f6f604 100644
  29. --- a/configure.ac
  30. +++ b/configure.ac
  31. @@ -530,6 +530,10 @@ AM_CONDITIONAL(INSTALL_RDM_TESTS, test "${enable_rdm_tests}" = "yes")
  32. if test "${enable_python_libs}" = "yes"; then
  33. AM_PATH_PYTHON(2.6)
  34. + if test -z $PYTHON; then
  35. + PYTHON="python"
  36. + fi
  37. + PYTHON_NAME=`basename $PYTHON`
  38. AX_PYTHON_MODULE("google.protobuf", "fatal")
  39. fi