1AC_INIT([pyatspi], [2.38.1], [accessibility-atspi@lists.linux-foundation.org]) 2AC_CONFIG_AUX_DIR(config) 3 4# The version of python used is determined by the executable pointed to by the 5# --with-python switch, or if that's not set, by the PYTHON environment 6# variable. For instance if your system installs Python 3 as python3 to 7# configure to compile pygobject under Python 3 you would do this: 8# $ ./configure --with-python=python3 9# or 10# $ PYTHON=python3 ./configure 11# 12# You can also build against a full interpreter path, such as 13# $ ./configure --with-python=~/my-patched-python/python 14 15LT_RELEASE=$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION 16LT_CURRENT=0 17LT_REVISION=0 18LT_AGE=0 19LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}' 20AC_SUBST(LT_VERSION_INFO) 21AC_SUBST(LT_RELEASE) 22AC_SUBST(LT_CURRENT) 23AC_SUBST(LT_REVISION) 24AC_SUBST(LT_AGE) 25 26AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz]) 27 28AC_PROG_CC 29 30# option to specify python interpreter to use; this just sets $PYTHON, so that 31# we will fallback to reading $PYTHON if --with-python is not given, and 32# python.m4 will get the expected input 33AC_ARG_WITH(python, 34 AC_HELP_STRING([--with-python=PATH], [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]), 35 [PYTHON="$withval"], []) 36if test x"$PYTHON" = xyes; then 37 AC_MSG_ERROR([--with-python option requires a path or program argument]) 38fi 39if test -n "$PYTHON" && ! which "$PYTHON"; then 40 AC_MSG_ERROR([Python interpreter $PYTHON does not exist]) 41fi 42 43AM_PATH_PYTHON(2.6) 44AM_DISABLE_STATIC 45AM_PROG_LIBTOOL 46PKG_PROG_PKG_CONFIG 47 48AC_CONFIG_HEADERS([config.h]) 49 50AC_MSG_CHECKING([whether tests are enabled]) 51AC_ARG_ENABLE(tests, 52 [AS_HELP_STRING([--enable-tests], [Build with testing enabled])], 53 enable_tests=$enableval, 54 enable_tests=no) 55AC_MSG_RESULT($enable_tests) 56AM_CONDITIONAL(ENABLE_TESTING, test x$enable_tests = xyes) 57 58if test "$enable_tests" = "yes"; then 59 AM_CHECK_PYMOD(dbus, , , [AC_MSG_ERROR(Could not find python module: dbus)]) 60 61 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0]) 62 AC_SUBST(DBUS_LIBS) 63 AC_SUBST(DBUS_CFLAGS) 64 65 PKG_CHECK_MODULES(GLIB, [glib-2.0]) 66 AC_SUBST(GLIB_LIBS) 67 AC_SUBST(GLIB_CFLAGS) 68 69 PKG_CHECK_MODULES(AT_SPI, [atspi-2]) 70 AC_SUBST(AT_SPI_LIBS) 71 AC_SUBST(AT_SPI_CFLAGS) 72 73 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0]) 74 AC_SUBST(GOBJ_LIBS) 75 AC_SUBST(GOBJ_CFLAGS) 76 77 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.0.0]) 78 AC_SUBST(GMODULE_LIBS) 79 AC_SUBST(GMODULE_CFLAGS) 80 81 PKG_CHECK_MODULES(LIB_XML, [libxml-2.0 >= 2.0.0]) 82 AC_SUBST(LIB_XML_LIBS) 83 AC_SUBST(LIB_XML_CFLAGS) 84 85 PKG_CHECK_MODULES(ATK, [atk >= 2.11.2]) 86 AC_SUBST(ATK_LIBS) 87 AC_SUBST(ATK_CFLAGS) 88 89 PKG_CHECK_MODULES(GTK, [gtk+-3.0]) 90 AC_SUBST(GTK_LIBS) 91 AC_SUBST(GTK_CFLAGS) 92fi 93 94 PKG_CHECK_MODULES(PYGOBJ, [pygobject-3.0 >= 2.90.1]) 95 96AM_CONDITIONAL(SET_GTK_MODULE, test -z "$GTK_MODULE_DIR") 97AC_ARG_VAR([GTK_MODULE_DIR], [Where to find the atk-adaptor gtk module]) 98if test -z "$GTK_MODULE_DIR"; then 99 GTK_MODULE_DIR=gtk-2.0/modules 100fi 101 102AC_PATH_XTRA 103 104AC_CONFIG_FILES([Makefile 105 tests/Makefile 106 tests/dummyatk/Makefile 107 tests/data/Makefile 108 tests/pyatspi/Makefile 109 tests/pyatspi/testrunner 110 tests/pyatspi/pasytest/Makefile 111 tests/apps/Makefile 112 pyatspi/Makefile 113 examples/Makefile 114 ]) 115 116AC_OUTPUT 117