X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=m4%2Fpython.m4;h=49602977d3dff7ff6e5f678a9f08a093c21be2a1;hb=03d42b5d8253ad2de94df20b12b9fb22ce51eb3d;hp=e9f9c6ac5e16e3b6b9eae8e5d6be7b835126fcb8;hpb=02601c2856c604786acca84e3aef176baadc5c61;p=chaz%2Fopenbox diff --git a/m4/python.m4 b/m4/python.m4 index e9f9c6ac..49602977 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -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 @@ -40,12 +41,12 @@ AC_DEFUN([PYTHON_DEVEL], do if test -r "$i/libpython$PYTHON_VERSION.so"; then PYLIB="$i/libpython$PYTHON_VERSION.so" - PYTHON_LIBS="-L$i -l$PYVERSION" + PYTHON_LIBS="-L$i -lpython$PYTHON_VERSION" break else - if test -r "$i/lib$PYVERSION.a"; then - PYLIB="$i/lib$PYVERSION.a" - PYTHON_LIBS="-L$i -l$PYVERSION -lpthread -ldl -lutil -lm" + 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 # look for really old versions @@ -57,7 +58,7 @@ AC_DEFUN([PYTHON_DEVEL], fi fi done - if test "$python_path" + if test "$PYLIB" then AC_MSG_RESULT([$PYLIB]) else