comparison 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 41959f031322
comparison
equal deleted inserted replaced
21799:f14da598bffe 21800:73aab5bdd830
1333 else 1333 else
1334 echo "Building without D-Bus support" 1334 echo "Building without D-Bus support"
1335 fi 1335 fi
1336 1336
1337 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes") 1337 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1338
1339 dnl Check for Python headers (currently useful only for libgnt)
1340 dnl (Thanks to XChat)
1341 AC_PATH_PROG(pythonpath, python)
1342 if test "_$pythonpath" != _ ; then
1343 AC_MSG_CHECKING(for Python compile flags)
1344 PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'`
1345 PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'`
1346 changequote(<<, >>)dnl
1347 PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'`
1348 PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'`
1349 changequote([, ])dnl
1350 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1351 AC_CHECK_LIB(pthread, pthread_create, )
1352 AC_CHECK_LIB(util, openpty, )
1353 AC_CHECK_LIB(db, dbopen, )
1354 PY_LIBS="-lpython$PY_VERSION -L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
1355 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1356 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1357 AC_MSG_RESULT(ok)
1358 else
1359 AC_MSG_RESULT([Can't find Python.h])
1360 PY_LIBS=""
1361 PY_CFLAGS=""
1362 fi
1363 fi
1364 AC_SUBST(PY_CFLAGS)
1365 AC_SUBST(PY_LIBS)
1338 1366
1339 dnl ####################################################################### 1367 dnl #######################################################################
1340 dnl # Check for Mono support 1368 dnl # Check for Mono support
1341 dnl ####################################################################### 1369 dnl #######################################################################
1342 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no) 1370 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)