Update build toolchain for wxPython Phoenix

parent 7f317363
......@@ -67,14 +67,17 @@ if (test "$enable_python" = "yes") || (test "$enable_module" = "yes"); then
LIBPYTHON_LDFLAGS=$PYTHON_LDFLAGS
LIBPYTHON_INCLUDES=$PYTHON_CPPFLAGS
LIBNUMPY_INCLUDES=$PYTHON_NUMPY_INCLUDE
LIBWXPYTHON_INCLUDES=$PYTHON_WXPYTHON_INCLUDE
else
LIBPYTHON_LDFLAGS=
LIBPYTHON_INCLUDES=
LIBNUMPY_INCLUDES=
LIBWXPYTHON_INCLUDES=
fi
AC_SUBST(LIBPYTHON_LDFLAGS)
AC_SUBST(LIBPYTHON_INCLUDES)
AC_SUBST(LIBNUMPY_INCLUDES)
AC_SUBST(LIBWXPYTHON_INCLUDES)
AC_MSG_CHECKING(for kernel)
case ${STFKERNEL} in
......
......@@ -196,6 +196,32 @@ $ac_numpy_result])
AC_MSG_RESULT([$PYTHON_NUMPY_INCLUDE])
AC_SUBST([PYTHON_NUMPY_INCLUDE])
#
# Check if you have wxPython, else fail
#
AC_MSG_CHECKING([for wxPython])
ac_wxpython_result=`$PYTHON -c "import wx" 2>&1`
if test -z "$ac_wxpython_result"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import Python module "wxpython".
Please check your wxpython installation. The error was:
$ac_wxpython_result])
PYTHON_VERSION=""
fi
#
# Check for wxpython headers
#
AC_MSG_CHECKING([for wxpython include path])
if test -z "$PYTHON_WXPYTHON_INCLUDE"; then
PYTHON_WXPYTHON_INCLUDE=-I`$PYTHON -c "import os, sys, wx; \
sys.stdout.write(os.path.join(os.path.dirname(wx.__spec__.origin), 'include') + '\n');"`
fi
AC_MSG_RESULT([$PYTHON_WXPYTHON_INCLUDE])
AC_SUBST([PYTHON_WXPYTHON_INCLUDE])
#
# libraries which must be linked in when embedding
#
......
......@@ -17,7 +17,7 @@ endif
# the application source, library search path, and link libraries
if BUILD_PYTHON
PYTHON_ADDINCLUDES = $(LIBNUMPY_INCLUDES) $(LIBPYTHON_INCLUDES)
PYTHON_ADDINCLUDES = $(LIBNUMPY_INCLUDES) $(LIBPYTHON_INCLUDES) $(LIBWXPYTHON_INCLUDES)
else
PYTHON_ADDINCLUDES =
endif
......
......@@ -12,7 +12,7 @@ nodist_libpystf_la_SOURCES = $(srcdir)/pystf_wrap.cxx
libpystf_la_SOURCES = $(srcdir)/pystf.cxx # $(SWIG_SOURCES)
noinst_HEADERS = pystf.h
INCLUDES = $(LIBNUMPY_INCLUDES)
INCLUDES = $(LIBNUMPY_INCLUDES) $(LIBPYTHON_INCLUDES) $(LIBWXPYTHON_INCLUDES)
libpystf_la_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/src
libpystf_la_CXXFLAGS = $(OPT_CXXFLAGS) $(WX_CXXFLAGS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment