Find the python libraries and includes even if the path to them includes a symlink.

When python is installed using MacPorts there is a symlink in the path.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21301 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Mike Alexander
2011-09-22 21:02:44 +00:00
parent bdd46d7c38
commit 5307ca5ab3

View File

@@ -22,7 +22,7 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
AC_MSG_CHECKING([for Python include path])
python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
python_path=`find $i -type f -name Python.h -print | sed "1q"`
python_path=`find -L $i -type f -name Python.h -print | sed "1q"`
if test -n "$python_path" ; then
break
fi
@@ -38,7 +38,7 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
AC_MSG_CHECKING([for Python library path])
python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
python_path=`find -L $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
if test -n "$python_path" ; then
break
fi