changeset 224:d9ba8fa961e7

fix ax_python as done in libtorrent
author Carl Byington <carl@five-ten-sg.com>
date Tue, 23 Jun 2009 16:08:39 -0700
parents a60af76317ab
children 9859474779da
files libpst.spec.in m4/ax_python.m4
diffstat 2 files changed, 14 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/libpst.spec.in	Tue Jun 23 15:15:55 2009 -0700
+++ b/libpst.spec.in	Tue Jun 23 16:08:39 2009 -0700
@@ -9,15 +9,7 @@
 URL:                http://www.five-ten-sg.com/%{name}/
 Requires:           ImageMagick
 Requires:           %{name}-libs = %{version}-%{release}
-
-BuildRequires:      ImageMagick freetype-devel gd-devel libjpeg-devel zlib-devel python-devel
-%if 0%{?fedora} > 10
-BuildRequires: boost-python-devel
-%else
-BuildRequires: boost-devel
-%endif
-
-
+BuildRequires:      ImageMagick freetype-devel gd-devel libjpeg-devel zlib-devel python-devel boost-devel
 
 %{!?python_sitelib:  %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
--- a/m4/ax_python.m4	Tue Jun 23 15:15:55 2009 -0700
+++ b/m4/ax_python.m4	Tue Jun 23 16:08:39 2009 -0700
@@ -59,19 +59,19 @@
 [AC_MSG_CHECKING(for python build information)
 AC_MSG_RESULT([])
 for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
-AC_CHECK_PROGS(PYTHON_BIN, [$python])
-ax_python_bin=$PYTHON_BIN
-if test x$ax_python_bin != x; then
-   AC_CHECK_LIB($ax_python_bin, main, ax_python_lib=$ax_python_bin, ax_python_lib=no)
-   AC_CHECK_HEADER([$ax_python_bin/Python.h],
-   [[ax_python_header=`locate $ax_python_bin/Python.h | sed -e s,/Python.h,,`]],
-   ax_python_header=no)
-   if test $ax_python_lib != no; then
-     if test $ax_python_header != no; then
-       break;
-     fi
-   fi
-fi
+    AC_CHECK_PROGS(PYTHON_BIN, [$python])
+    ax_python_bin=$PYTHON_BIN
+    if test x$ax_python_bin != x; then
+        AC_CHECK_LIB($ax_python_bin, main, ax_python_lib=$ax_python_bin, ax_python_lib=no)
+        AC_CHECK_HEADER([$ax_python_bin/Python.h],
+                        [[ax_python_header=$includedir/$ax_python_bin]],
+                        ax_python_header=no)
+        if test $ax_python_lib != no; then
+            if test $ax_python_header != no; then
+                break;
+            fi
+        fi
+    fi
 done
 if test x$ax_python_bin = x; then
    ax_python_bin=no