1 dnl Copyright © 2008 Dan Nicholson
3 dnl Permission to use, copy, modify, distribute, and sell this software and its
4 dnl documentation for any purpose is hereby granted without fee, provided that
5 dnl the above copyright notice appear in all copies and that both that
6 dnl copyright notice and this permission notice appear in supporting
7 dnl documentation, and that the name of Keith Packard not be used in
8 dnl advertising or publicity pertaining to distribution of the software without
9 dnl specific, written prior permission. Keith Packard makes no
10 dnl representations about the suitability of this software for any purpose. It
11 dnl is provided "as is" without express or implied warranty.
13 dnl DAN NICHOLSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
14 dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
15 dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
16 dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
17 dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 dnl PERFORMANCE OF THIS SOFTWARE.
21 dnl Process this file with autoconf to create configure.
24 AC_INIT([libxkbcommon], [0.1.0],
25 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
26 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
32 m4_ifndef([PKG_PROG_PKG_CONFIG],
33 [m4_fatal([Could not locate the pkg-config autoconf macros.
34 These are usually located in /usr/share/aclocal/pkg.m4. If your
35 macros are in a different location, try setting the environment
36 variable ACLOCAL="aclocal -I/other/macro/dir" before running
37 autoreconf/autogen.sh.])])
40 dnl Build native compiler needed for makekeys
41 AC_ARG_VAR([CC_FOR_BUILD], [Build native C compiler program])
42 if test "x$CC_FOR_BUILD" = x; then
43 if test "$cross_compiling" != no; then
44 AC_PATH_PROGS([CC_FOR_BUILD], [gcc cc], [cc])
50 PKG_CHECK_MODULES([X11], [xproto])
52 dnl Ensure we have keysym headers
53 AC_MSG_CHECKING([for X11 includedir])
54 x11includedir="`$PKG_CONFIG --variable=includedir xproto`/X11"
55 AC_MSG_RESULT([$x11includedir])
57 AC_MSG_CHECKING([for keysymdef.h])
58 KEYSYMDEF_H="$x11includedir/keysymdef.h"
59 test -f "$KEYSYMDEF_H" || AC_MSG_ERROR([can't locate keysymdef.h in $x11includedir])
60 AC_MSG_RESULT([$KEYSYMDEF_H])
61 AC_SUBST([KEYSYMDEF_H])
63 AC_MSG_CHECKING([for XF86keysym.h])
64 XF86KEYSYM_H="$x11includedir/XF86keysym.h"
65 test -f "$XF86KEYSYM_H" || AC_MSG_ERROR([can't locate XF86keysym.h in $x11includedir])
66 AC_MSG_RESULT([$XF86KEYSYM_H])
67 AC_SUBST([XF86KEYSYM_H])
69 # Require xorg-macros version 1.2.0 or newer for XORG_CHANGELOG macro
70 m4_ifndef([XORG_MACROS_VERSION],
71 [m4_fatal([must install xorg-macros before running autoconf/autogen.sh])])
72 XORG_MACROS_VERSION([1.2.0])