Mercurial > pidgin
comparison finch/libgnt/configure.ac @ 21800:73aab5bdd830
Allow loading python scripts at runtime.
Things can go wrong if a script starts its own mainloop, or blocks on something.
For now, a script can check for a positive return value from 'gobject.main_depth()'
to determine that it's being loaded at runtime, and not start its own mainloop.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 09 Dec 2007 00:56:29 +0000 |
parents | ca3271a66314 |
children | a0b0d20ba15a |
comparison
equal
deleted
inserted
replaced
21799:f14da598bffe | 21800:73aab5bdd830 |
---|---|
300 if test "x$enable_gnt" = "xno"; then | 300 if test "x$enable_gnt" = "xno"; then |
301 AC_MSG_ERROR([ | 301 AC_MSG_ERROR([ |
302 *** You need ncursesw or ncurses and its header files.]) | 302 *** You need ncursesw or ncurses and its header files.]) |
303 fi | 303 fi |
304 | 304 |
305 dnl Check for Python headers (currently useful only for libgnt) | |
306 dnl (Thanks to XChat) | |
307 AC_PATH_PROG(pythonpath, python) | |
308 if test "_$pythonpath" != _ ; then | |
309 AC_MSG_CHECKING(for Python compile flags) | |
310 PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'` | |
311 PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'` | |
312 changequote(<<, >>)dnl | |
313 PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'` | |
314 PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'` | |
315 changequote([, ])dnl | |
316 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then | |
317 AC_CHECK_LIB(pthread, pthread_create, ) | |
318 AC_CHECK_LIB(util, openpty, ) | |
319 AC_CHECK_LIB(db, dbopen, ) | |
320 PY_LIBS="-lpython$PY_VERSION -L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" | |
321 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" | |
322 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.]) | |
323 AC_MSG_RESULT(ok) | |
324 else | |
325 AC_MSG_RESULT([Can't find Python.h]) | |
326 PY_LIBS="" | |
327 PY_CFLAGS="" | |
328 fi | |
329 fi | |
330 AC_SUBST(PY_CFLAGS) | |
331 AC_SUBST(PY_LIBS) | |
332 | |
305 dnl Check for libxml | 333 dnl Check for libxml |
306 have_libxml=yes | 334 have_libxml=yes |
307 PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , [ | 335 PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , [ |
308 AC_MSG_RESULT(no) | 336 AC_MSG_RESULT(no) |
309 have_libxml=no | 337 have_libxml=no |