configure.ac revision 765b7306
1dnl  Copyright 2005 Red Hat, Inc.
2dnl
3dnl  Permission to use, copy, modify, distribute, and sell this software and its
4dnl  documentation for any purpose is hereby granted without fee, provided that
5dnl  the above copyright notice appear in all copies and that both that
6dnl  copyright notice and this permission notice appear in supporting
7dnl  documentation, and that the name of Red Hat not be used in
8dnl  advertising or publicity pertaining to distribution of the software without
9dnl  specific, written prior permission.  Red Hat makes no
10dnl  representations about the suitability of this software for any purpose.  It
11dnl  is provided "as is" without express or implied warranty.
12dnl
13dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
14dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
15dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
16dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
17dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19dnl  PERFORMANCE OF THIS SOFTWARE.
20dnl
21dnl Process this file with autoconf to create configure.
22
23AC_PREREQ([2.60])
24AC_INIT([xauth],
25	[1.1.2],
26	[https://gitlab.freedesktop.org/xorg/app/xauth/issues],
27	[xauth])
28AM_INIT_AUTOMAKE([foreign dist-xz])
29
30AC_CONFIG_HEADERS([config.h])
31
32# Set common system defines for POSIX extensions, such as _GNU_SOURCE
33# Must be called before any macros that run the compiler (like
34# AC_PROG_LIBTOOL) to avoid autoconf errors.
35AC_USE_SYSTEM_EXTENSIONS
36
37# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
38m4_ifndef([XORG_MACROS_VERSION],
39          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
40XORG_MACROS_VERSION(1.8)
41XORG_DEFAULT_OPTIONS
42
43AC_CHECK_HEADERS([net/errno.h])
44
45AC_CHECK_FUNCS([reallocarray strlcpy])
46
47# Checks for pkg-config packages
48PKG_CHECK_MODULES(XAUTH, x11 xau xext xmuu xproto >= 7.0.17)
49
50# Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
51# was not expanded, since xauth with no address support is rather broken.
52#
53# If you're seeing an error here, be sure you installed the lib/xtrans module
54# first and if it's not in the default location, that you set the ACLOCAL
55# environment variable to find it, such as:
56#       ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
57m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
58
59# Transport selection macro from xtrans.m4
60# Needed to set *CONN defines for gethost.c & parsedpy.c
61XTRANS_CONNECTION_FLAGS
62
63XORG_WITH_LINT
64
65AC_CONFIG_FILES([
66	Makefile
67	tests/Makefile
68	man/Makefile])
69AC_OUTPUT
70