mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 12:27:51 +00:00
revert part of the changes by dfranke,
...those broke creation of the tarball now the interesting task starts: get rid off the python configure check (and using python flags at building) without breaking installation of the python tools
This commit is contained in:
parent
841a800e95
commit
2d16cec623
11
Makefile.am
11
Makefile.am
@ -185,6 +185,17 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = config/config.rpath config/mkinstalldirs config/py-compile
|
||||
|
||||
if PYTHON_INSTALL
|
||||
pkgpython_PYTHON = data/tools/wesnoth/wmltools.py \
|
||||
data/tools/wesnoth/libsvn.py \
|
||||
data/tools/wesnoth/wescamp.py \
|
||||
data/tools/wesnoth/wmldata.py \
|
||||
data/tools/wesnoth/wmliterator.py \
|
||||
data/tools/wesnoth/wmlparser.py \
|
||||
data/tools/wesnoth/campaignserver_client.py \
|
||||
data/tools/wesnoth/__init__.py
|
||||
endif
|
||||
|
||||
update-po:
|
||||
@cd po && make $@ || exit $?
|
||||
if MANUALUPDATE
|
||||
|
97
configure.ac
97
configure.ac
@ -129,6 +129,16 @@ AC_ARG_ENABLE([static],
|
||||
[static=$enableval],
|
||||
[static=no])
|
||||
|
||||
AC_ARG_ENABLE([python],
|
||||
AS_HELP_STRING([--disable-python], [disable Python support]),
|
||||
[python=$enableval],
|
||||
[python=yes])
|
||||
|
||||
AC_ARG_ENABLE([python_install],
|
||||
AS_HELP_STRING([--enable-python-install], [enable installation of Python developer tools]),
|
||||
[python_install=$enableval],
|
||||
[python_install=no])
|
||||
|
||||
AC_ARG_ENABLE([tinygui],
|
||||
AS_HELP_STRING([--enable-tinygui], [enable GUI reductions for resolutions down to 320x240 (PDAs), resize images before installing]),
|
||||
[tinygui=$enableval],
|
||||
@ -273,6 +283,18 @@ AC_ARG_ENABLE([internal-data],
|
||||
[internaldata=$enableval],
|
||||
[internaldata=no])
|
||||
|
||||
if test "x$game" = "xno"
|
||||
then
|
||||
python=no
|
||||
AC_MSG_WARN([*** Game build disabled, suppressing Python support.])
|
||||
fi
|
||||
|
||||
if test "x$python" = "xno"
|
||||
then
|
||||
python_install=no
|
||||
AC_MSG_WARN([*** Python support disabled, suppressing installation of Python tools.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([raw-sockets],
|
||||
AS_HELP_STRING([--enable-raw-sockets], [use raw receiving sockets in the multiplayer network layer rather than the SDL_net facilities]),
|
||||
[raw_sockets=$enableval],
|
||||
@ -289,6 +311,7 @@ then
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([STATIC], [test x$static = xyes])
|
||||
AM_CONDITIONAL([PYTHON_INSTALL], [test x$python_install = xyes])
|
||||
AM_CONDITIONAL([GAME], [test x$game = xyes])
|
||||
AM_CONDITIONAL([SERVER], [test x$server = xyes])
|
||||
AM_CONDITIONAL([CAMPAIGNSERVER], [test x$campaignserver = xyes])
|
||||
@ -401,6 +424,80 @@ AC_SUBST([FRIBIDI_CFLAGS])
|
||||
AC_SUBST([FRIBIDI_LIBS])
|
||||
AM_CONDITIONAL([FRIBIDI], [test "x$fribidifound" = xyes -a "x$fribidi" = xyes ])
|
||||
|
||||
# python
|
||||
if test "x$python" = "xyes"; then
|
||||
pythonfound=yes
|
||||
if test "x$PYTHON" = "x"; then
|
||||
AC_PATH_PROG(PYTHON, python, none)
|
||||
fi
|
||||
|
||||
if test "x$PYTHON" = "xnone"; then
|
||||
AC_MSG_WARN([*** Python interpreter not found, Python support disabled.])
|
||||
pythonfound=no
|
||||
fi
|
||||
|
||||
if test "x$pythonfound" = "xyes"; then
|
||||
AC_MSG_CHECKING(Python version and location)
|
||||
PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
|
||||
PYTHON_VERSION_MAJOR=[`$PYTHON -c "import sys; print '%d' % (sys.version_info[0]);"`]
|
||||
PYTHON_VERSION_MINOR=[`$PYTHON -c "import sys; print '%d' % (sys.version_info[1]);"`]
|
||||
PYTHON_VERSION="${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
|
||||
AC_MSG_RESULT([$PYTHON, $PYTHON_VERSION, $PYTHON_PREFIX])
|
||||
|
||||
AC_MSG_CHECKING(whether Python is at least 2.4)
|
||||
if test $PYTHON_VERSION_MAJOR -lt 2 -o $PYTHON_VERSION_MAJOR -eq 2 -a $PYTHON_VERSION_MINOR -lt 4; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([*** Wesnoth requires at least Python 2.4, Python support disabled.])
|
||||
pythonfound=no
|
||||
fi
|
||||
if test "x$pythonfound" = "xyes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
PYTHON_CFLAGS="-DHAVE_PYTHON -I$PYTHON_PREFIX/include/python$PYTHON_VERSION"
|
||||
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
OLD_CXXFLAGS="$CXXFLAGS"
|
||||
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"
|
||||
|
||||
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 '.' '_'`
|
||||
|
||||
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)
|
||||
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
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([PYTHON], [test "x$pythonfound" = xyes -a "x$python" = xyes ])
|
||||
|
||||
# libpng-config
|
||||
|
||||
AC_PATH_PROGS([PNG_CONFIG], [libpng-config libpng12-config], [none])
|
||||
|
Loading…
x
Reference in New Issue
Block a user