]> Dogcows Code - chaz/openbox/blobdiff - m4/python.m4
new build system without automake
[chaz/openbox] / m4 / python.m4
index d00ac4785c103d78eda7dccc9c366b7668023126..49602977d3dff7ff6e5f678a9f08a093c21be2a1 100644 (file)
@@ -2,7 +2,8 @@
 #
 # Checks for Python and tries to get the include path to 'Python.h', and
 # the libpython library.
-# It provides the $(PYTHON_CFLAGS) $(PYTHON_LIBS) output variables.
+# It provides the $(PYTHON_CFLAGS) $(PYTHON_LIBS) output
+# variables.
 AC_DEFUN([PYTHON_DEVEL],
 [
   AC_REQUIRE([AM_PATH_PYTHON])
@@ -14,7 +15,7 @@ AC_DEFUN([PYTHON_DEVEL],
   for i in "$python_prefix/include/python$PYTHON_VERSION/" \
            "$python_prefix/include/python/" "$python_prefix/"
   do
-    python_path=`find $i -type f -name Python.h -print`
+    python_path=`find $i -type f -name Python.h -print 2> /dev/null`
     test "$python_path" && break
   done
   for i in $python_path
@@ -43,8 +44,8 @@ AC_DEFUN([PYTHON_DEVEL],
       PYTHON_LIBS="-L$i -lpython$PYTHON_VERSION"
       break
     else
-      if test -r "$i/lib$PYVERSION.a"; then
-        PYLIB="$i/lib$PYVERSION.a"
+      if test -r "$i/libpython$PYTHON_VERSION.a"; then
+        PYLIB="$i/libpython$PYTHON_VERSION.a"
         PYTHON_LIBS="-L$i -lpython$PYTHON_VERSION -lpthread -ldl -lutil -lm"
         break
       else
@@ -57,7 +58,7 @@ AC_DEFUN([PYTHON_DEVEL],
       fi
     fi
   done
-  if test "$python_path"
+  if test "$PYLIB"
   then
     AC_MSG_RESULT([$PYLIB])
   else
This page took 0.020985 seconds and 4 git commands to generate.