[pygobject/pygobject-2-28] fix build to correctly use python-config



commit e12097a3fc006f435ae01156e55cacd7622a6e06
Author: John (J5) Palmieri <johnp redhat com>
Date:   Thu Feb 10 16:46:08 2011 -0500

    fix build to correctly use python-config

 autogen.sh        |    3 +++
 configure.ac      |    6 ------
 m4/python.m4      |    9 +++++----
 tests/runtests.py |    1 +
 4 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 4711ef3..6c3aa86 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -22,6 +22,9 @@ if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
         2.2*)
         have_libtool=true
         ;;
+        2.4*)
+        have_libtool=true
+        ;;
     esac
 fi
 if $have_libtool ; then : ; else
diff --git a/configure.ac b/configure.ac
index 8f9d46c..0f77c1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,12 +104,6 @@ fi
 AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
 
 AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
-py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
-if test -x "$PYTHON-config"; then
-PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
-else
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-fi
 old_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
 AC_TRY_COMPILE([#include <Python.h>],
diff --git a/m4/python.m4 b/m4/python.m4
index edc3094..4f98ad7 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -45,12 +45,13 @@ AC_MSG_CHECKING(for headers required to compile python extensions)
 dnl deduce PYTHON_INCLUDES and PYTHON_LIBS
 py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
 py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
-if test -x "$PYTHON-config"; then
-PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
-PYTHON_LIBS=`$PYTHON-config --libs 2>/dev/null`
+PYTHON_CONFIG=`which $PYTHON`-config
+if test -x "$PYTHON_CONFIG"; then
+PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
+PYTHON_LIBS=`$PYTHON_CONFIG --libs 2>/dev/null`
 else
 PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-PYTHON_LIBS=`-lpython${PYTHON_VERSION}`
+PYTHON_LIBS="-lpython${PYTHON_VERSION}"
 if test "$py_prefix" != "$py_exec_prefix"; then
   PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
 fi
diff --git a/tests/runtests.py b/tests/runtests.py
index d99f0cc..54c65aa 100644
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -6,6 +6,7 @@ import glob
 import unittest
 
 
+
 # Load tests.
 if 'TEST_NAMES' in os.environ:
 	names = os.environ['TEST_NAMES'].split()



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