2 # Copyright (c) 2010 Petr Stetiar <ynezz@true.cz>
3 # Copyright (c) 2010 Tias Guns <tias@ulyssis.org>
5 # Permission is hereby granted, free of charge, to any person
6 # obtaining a copy of this software and associated documentation
7 # files (the "Software"), to deal in the Software without
8 # restriction, including without limitation the rights to use,
9 # copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the
11 # Software is furnished to do so, subject to the following
14 # The above copyright notice and this permission notice shall be
15 # included in all copies or substantial portions of the Software.
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 # OTHER DEALINGS IN THE SOFTWARE.
28 AC_INIT(xinput_calibrator,[0.7.5], [http://github.com/tias/xinput_calibrator/issues],, [http://www.freedesktop.org/wiki/Software/xinput_calibrator])
29 AM_INIT_AUTOMAKE([foreign dist-bzip2])
38 AC_CHECK_HEADERS([stdlib.h string.h])
42 PKG_CHECK_MODULES(XINPUT, x11 xext xi inputproto)
43 AC_SUBST(XINPUT_CFLAGS)
46 PKG_CHECK_MODULES(XI_PROP, [xi >= 1.2] [inputproto >= 1.5],
47 AC_DEFINE(HAVE_XI_PROP, 1, [Xinput properties available]), foo="bar")
50 AC_ARG_WITH([gui], AS_HELP_STRING([--with-gui=default], [Use gtkmm GUI if available, x11 GUI otherwise (default)]),,[with_gui=default])
51 AC_ARG_WITH([gui], AS_HELP_STRING([--with-gui=gtkmm], [Use gtkmm GUI]))
52 AC_ARG_WITH([gui], AS_HELP_STRING([--with-gui=x11], [Use native x11 GUI]))
53 AC_MSG_CHECKING([gui])
54 AC_MSG_RESULT($with_gui)
56 AS_IF([test "x$with_gui" = xdefault || test "x$with_gui" = xgtkmm], [
57 PKG_CHECK_MODULES(GTKMM, [gtkmm-2.4], with_gui="gtkmm",
58 [if test "x$with_gui" = xgtkmm; then
59 AC_MSG_ERROR([GTKMM GUI requested, but gtkmm-2.4 not found])
61 AC_SUBST(GTKMM_CFLAGS)
64 AM_CONDITIONAL([BUILD_GTKMM], [test "x$with_gui" = xgtkmm])
66 AS_IF([test "x$with_gui" = xdefault || test "x$with_gui" = xx11], [
67 PKG_CHECK_MODULES(X11, [x11], with_gui="x11", with_gui="no")
71 # check for xrandr too
72 PKG_CHECK_MODULES(XRANDR, [xrandr], AC_DEFINE(HAVE_X11_XRANDR, 1), foo="bar")
73 AC_SUBST(XRANDR_CFLAGS)
76 AM_CONDITIONAL([BUILD_X11], [test "x$with_gui" = xx11])
85 src/calibrator/Makefile