make install still works.

This commit is contained in:
Eric S. Raymond 2008-01-10 23:18:17 +00:00
parent 2125ea0cb9
commit a25a832e01

View file

@ -421,37 +421,29 @@ if test "x$python" = "xyes"; then
CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
CXXFLAGS="$CXXFLAGS $PYTHON_CFLAGS"
AC_CHECK_HEADER([Python.h],
[],
[AC_MSG_WARN([*** Python include files not found! You should install Python development package. Python support disabled]); pythonfound=no])
CPPFLAGS="$OLD_CPPFLAGS"
CXXFLAGS="$OLD_CXXFLAGS"
AC_SUBST([PYTHON_CFLAGS])
if test "x$pythonfound" = "xyes"; then
AC_SUBST([PYTHON_CFLAGS])
pythonfound=no
for pylibpath in '/usr/lib' $PYTHON_PREFIX/lib $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config; do
eval `echo unset ac_cv_lib_python$PYTHON_VERSION'___'Py_Finalize | tr '.' '_'`
pythonfound=no
for pylibpath in '/usr/lib' $PYTHON_PREFIX/lib $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config; do
eval `echo unset ac_cv_lib_python$PYTHON_VERSION'___'Py_Finalize | tr '.' '_'`
save_LIBS=$LIBS
LIBS="$LIBS -L$pylibpath"
AC_CHECK_LIB(python$PYTHON_VERSION, Py_Finalize, PYTHON_LIBS="-L$pylibpath -lpython$PYTHON_VERSION $PYTHON_DEPS"; pythonfound=yes,,$PYTHON_DEPS)
LIBS=$save_LIBS
if test "x$pythonfound" = "xyes"; then
break
fi
done
if test "x$pythonfound" != "xyes"; then
AC_MSG_WARN(*** Python development libraries required, Python support disabled)
save_LIBS=$LIBS
LIBS="$LIBS -L$pylibpath"
AC_CHECK_LIB(python$PYTHON_VERSION, Py_Finalize, PYTHON_LIBS="-L$pylibpath -lpython$PYTHON_VERSION $PYTHON_DEPS"; pythonfound=yes,,$PYTHON_DEPS)
LIBS=$save_LIBS
if test "x$pythonfound" = "xyes"; then
break
fi
AC_SUBST([PYTHON_LIBS])
done
AC_SUBST(pkgpythondir)
if test "x$python_install" = "xyes"; then
pkgpythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION"/site-packages/wesnoth"
fi
if test "x$pythonfound" != "xyes"; then
AC_MSG_WARN(*** Python development libraries required, Python support disabled)
fi
AC_SUBST([PYTHON_LIBS])
AC_SUBST(pkgpythondir)
if test "x$python_install" = "xyes"; then
pkgpythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION"/site-packages/wesnoth"
fi
fi
fi