1 diff --git a/configure.ac b/configure.ac
2 index d916891..d8c39a0 100644
5 @@ -1565,7 +1565,7 @@ if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ;
6 AC_MSG_CHECKING(for Python compile flags)
7 if test -f ${PYTHON}-config; then
8 PY_CFLAGS=`${PYTHON}-config --includes`
9 - PY_LIBS=`${PYTHON}-config --libs`
10 + PY_LIBS=`${PYTHON}-config --libs --embed` || PY_LIBS=`${PYTHON}-config --libs`
11 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])