* Drop libglademm dep, upgrade gtkmm dep to 2.12.1 and use
Gtkbuilder instead of Glade::XML * Misc bugfixes git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1326 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
a40c636ba7
commit
d704fc4b13
15 changed files with 375 additions and 271 deletions
|
@ -32,7 +32,7 @@ dnl @author Rafael Laboissiere <laboissiere@psy.mpg.de>
|
|||
dnl @author Andrew Collier <colliera@nu.ac.za>
|
||||
dnl @author Matteo Settenvini <matteo@member.fsf.org>
|
||||
dnl @author Horst Knorr <hk_classes@knoda.org>
|
||||
dnl @version 2006-02-05
|
||||
dnl @version 2008-01-16
|
||||
dnl @license GPLWithACException
|
||||
|
||||
AC_DEFUN([AC_PYTHON_DEVEL],[
|
||||
|
@ -134,49 +134,66 @@ $ac_distutils_result])
|
|||
if test -z "$PYTHON_LDFLAGS"; then
|
||||
# (makes two attempts to ensure we've got a version number
|
||||
# from the interpreter)
|
||||
py_version=`$PYTHON -c "from distutils.sysconfig import *; \
|
||||
ac_python_version=`$PYTHON -c "from distutils.sysconfig import *; \
|
||||
from string import join; \
|
||||
print join(get_config_vars('VERSION'))"`
|
||||
if test "$py_version" == "[None]"; then
|
||||
if test "$ac_python_version" = "[None]"; then
|
||||
if test -n "$PYTHON_VERSION"; then
|
||||
py_version=$PYTHON_VERSION
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
py_version=`$PYTHON -c "import sys; \
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
print sys.version[[:3]]"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# First, the library directory:
|
||||
ac_python_libdir=`$PYTHON -c \
|
||||
"import distutils.sysconfig,string; \
|
||||
print string.join(filter(None, \
|
||||
distutils.sysconfig.get_config_vars('LIBDIR')))"`
|
||||
|
||||
PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
|
||||
from string import join; \
|
||||
print '-L' + get_python_lib(0,1);"`
|
||||
# Before checking for libpythonX.Y, we need to know
|
||||
# the extension the OS we're on uses for libraries:
|
||||
ac_python_soext=`$PYTHON -c \
|
||||
"import distutils.sysconfig, string; \
|
||||
print string.join(filter(None, \
|
||||
distutils.sysconfig.get_config_vars('SO')))"`
|
||||
|
||||
# Now, for the library:
|
||||
ac_python_soname=`$PYTHON -c \
|
||||
"import distutils.sysconfig,string; \
|
||||
print string.join(filter(None, \
|
||||
distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
|
||||
|
||||
# We could have a versioned library, or an unversioned one,
|
||||
# even if the second case is discouraged. So, let's check for
|
||||
# the versioned one first, and fallback on the second later.
|
||||
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS"
|
||||
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
# Strip away extension from the end to canonicalize its name:
|
||||
ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"`
|
||||
|
||||
# This small piece shamelessly adapted from PostgreSQL python macro;
|
||||
# credits goes to momjian, I think. I'd like to put the right name
|
||||
# in the credits, if someone can point me in the right direction... ?
|
||||
#
|
||||
if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
|
||||
-a x"$ac_python_library" != x"$ac_python_soname"
|
||||
then
|
||||
# use the official shared library
|
||||
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
|
||||
PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
|
||||
else
|
||||
# old way: use libpython from python_configdir
|
||||
ac_python_libdir=`$PYTHON -c \
|
||||
"from distutils.sysconfig import get_python_lib as f; \
|
||||
import os; \
|
||||
print os.path.join(f(plat_specific=1,standard_lib=1),'config');"`
|
||||
PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||
fi
|
||||
|
||||
AC_LANG_PUSH([C])
|
||||
AC_CHECK_LIB([python$py_version], [Py_Initialize],
|
||||
[PYTHON_LDFLAGS="$PYTHON_LDFLAGS -lpython$py_version"],
|
||||
AC_CHECK_LIB([python], [Py_Initialize],
|
||||
[PYTHON_LDFLAGS="$PYTHON_LDFLAGS -lpython"],
|
||||
[PYTHON_LDFLAGS=""])
|
||||
)
|
||||
AC_LANG_POP
|
||||
|
||||
if test -z "$PYTHON_LDFLAGS"; then
|
||||
AC_MSG_ERROR([
|
||||
Could not link test program to Python. Maybe the main Python library has been
|
||||
installed in some non-standard library path. If so, pass it to configure,
|
||||
via the LDFLAGS environment variable.
|
||||
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
|
||||
])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
if test -z "PYTHON_LDFLAGS"; then
|
||||
AC_MSG_ERROR([
|
||||
Cannot determine location of your Python DSO. Please check it was installed with
|
||||
dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_LDFLAGS])
|
||||
AC_SUBST([PYTHON_LDFLAGS])
|
||||
|
||||
|
@ -231,14 +248,16 @@ $ac_distutils_result])
|
|||
|
||||
AC_MSG_RESULT([$pythonexists])
|
||||
|
||||
if test ! "$pythonexists" = "yes"; then
|
||||
if test ! "$pythonexists" = "yes"; then
|
||||
AC_MSG_ERROR([
|
||||
Could not link test program to Python. Maybe the main Python library has been
|
||||
installed in some non-standard library path. If so, pass it to configure,
|
||||
via the LDFLAGS environment variable.
|
||||
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
|
||||
============================================================================
|
||||
ERROR!
|
||||
You probably have to install the development version of the Python package
|
||||
for your distribution. The exact name of this package varies among them.
|
||||
Take also a look to config.log. If everything looks all right, please
|
||||
report the problem to the macro maintainer.
|
||||
============================================================================
|
||||
])
|
||||
PYTHON_VERSION=""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue