X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=m4%2Fpython.m4;h=cd5117d09c9dd84849e04aa98644c4df9be329ec;hb=747c089ae1c7df345c7ad98f833e8640ab0bc851;hp=48ab081849a8a541f01c0be208c16c4cb6874280;hpb=259f02836b80e8855519c536324299e581b1387d;p=chaz%2Fopenbox diff --git a/m4/python.m4 b/m4/python.m4 index 48ab0818..cd5117d0 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) $(PYTHON_LDFLAGS) 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 @@ -41,17 +42,20 @@ AC_DEFUN([PYTHON_DEVEL], if test -r "$i/libpython$PYTHON_VERSION.so"; then PYLIB="$i/libpython$PYTHON_VERSION.so" PYTHON_LIBS="-L$i -lpython$PYTHON_VERSION" + PYTHON_LDFLAGS="" break else 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" + PYTHON_LDFLAGS="-export-dynamic" break else # look for really old versions if test -r "$i/libPython.a"; then PYLIB="$i/libPython.a" PYTHON_LIBS="-L$i -lModules -lPython -lObjects -lParser" + PYTHON_LDFLAGS="-export-dynamic" break fi fi @@ -64,4 +68,5 @@ AC_DEFUN([PYTHON_DEVEL], AC_MSG_ERROR([cannot find python library]) fi AC_SUBST([PYTHON_LIBS]) + AC_SUBST([PYTHON_LDFLAGS]) ])