Revision 0.2
[rofl0r-libxauto.git] / configure.ac
bloba2b9f28b1b7534e3c5b6306c727c0ad25093a18d
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.64])
5 AC_INIT([xaut], [0.2.0], [chrsprkr3@gmail.com])
6 AC_CONFIG_SRCDIR([config.h.in])
7 AC_CONFIG_HEADERS([config.h])
9 # Checks for programs.
10 AC_PROG_CC
11 AC_PROG_INSTALL
13 # Checks for libraries.
14 AC_CHECK_LIB([X11], [XOpenDisplay], [], [AC_MSG_ERROR([X11 development libraries not found.  Exiting.])])
15 AC_CHECK_LIB([Xtst], [XTestFakeButtonEvent], [], [AC_MSG_ERROR([X11 test libraries not found.  Exiting.])])
17 #Selects the current python version - the pattern should be obvious
18 AC_CHECK_LIB([python2.5], [Py_Main], [LOCAL_PYTHON_VERSION="2.5"])
19 AC_CHECK_LIB([python2.6], [Py_Main], [LOCAL_PYTHON_VERSION="2.6"])
21 if test "x$LOCAL_PYTHON_VERSION" = "x"; then
22     echo Python library not found.  Exiting.
23     exit -1
24 else
25     echo Using python$LOCAL_PYTHON_VERSION
26     AC_SUBST(LOCAL_PYTHON_VERSION)
29 AC_CHECK_PROG([swig_prog], [swig], [swig], [])
30 if test "x$swig_prog" = "x"; then
31     echo swig not found.  Exiting.
32     exit -1
35 # Checks for header files.
36 AC_PATH_X
37 AC_CHECK_HEADERS([float.h limits.h stdlib.h string.h unistd.h])
39 # Checks for typedefs, structures, and compiler characteristics.
40 AC_HEADER_STDBOOL
41 AC_TYPE_SIZE_T
43 # Checks for library functions.
44 AC_FUNC_MALLOC
45 AC_FUNC_REALLOC
46 AC_CHECK_FUNCS([floor memset regcomp strstr])
48 AC_CONFIG_FILES([Makefile
49                  src/Makefile])
50 AC_OUTPUT