17a0395d0Smrgdnl  Copyright 2005 Red Hat, Inc.
296402570Smrgdnl
37a0395d0Smrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
47a0395d0Smrgdnl  documentation for any purpose is hereby granted without fee, provided that
57a0395d0Smrgdnl  the above copyright notice appear in all copies and that both that
67a0395d0Smrgdnl  copyright notice and this permission notice appear in supporting
77a0395d0Smrgdnl  documentation, and that the name of Red Hat not be used in
87a0395d0Smrgdnl  advertising or publicity pertaining to distribution of the software without
97a0395d0Smrgdnl  specific, written prior permission.  Red Hat makes no
107a0395d0Smrgdnl  representations about the suitability of this software for any purpose.  It
117a0395d0Smrgdnl  is provided "as is" without express or implied warranty.
1296402570Smrgdnl
137a0395d0Smrgdnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
147a0395d0Smrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
157a0395d0Smrgdnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
167a0395d0Smrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
177a0395d0Smrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
187a0395d0Smrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
197a0395d0Smrgdnl  PERFORMANCE OF THIS SOFTWARE.
207a0395d0Smrgdnl
217a0395d0Smrgdnl Process this file with autoconf to create configure.
227a0395d0Smrg
23273c00b8Smrg# Initialize Autoconf
24273c00b8SmrgAC_PREREQ([2.70])
252adc0320SmrgAC_INIT([xauth],
26f6d57fdeSmrg	[1.1.4],
27273c00b8Smrg	[https://gitlab.freedesktop.org/xorg/app/xauth/-/issues],
282adc0320Smrg	[xauth])
29273c00b8SmrgAC_CONFIG_SRCDIR([xauth.c])
302852888eSmrgAC_CONFIG_HEADERS([config.h])
317a0395d0Smrg
329a011757Smrg# Set common system defines for POSIX extensions, such as _GNU_SOURCE
339a011757Smrg# Must be called before any macros that run the compiler (like
349a011757Smrg# AC_PROG_LIBTOOL) to avoid autoconf errors.
359a011757SmrgAC_USE_SYSTEM_EXTENSIONS
369a011757Smrg
37273c00b8Smrg# Initialize Automake
38273c00b8SmrgAM_INIT_AUTOMAKE([foreign dist-xz])
39273c00b8Smrg
402adc0320Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
412adc0320Smrgm4_ifndef([XORG_MACROS_VERSION],
422adc0320Smrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
432adc0320SmrgXORG_MACROS_VERSION(1.8)
447366012aSmrgXORG_DEFAULT_OPTIONS
457366012aSmrg
46273c00b8Smrg# Checks for header files.
477a0395d0SmrgAC_CHECK_HEADERS([net/errno.h])
487a0395d0Smrg
49273c00b8Smrg# Checks for typedefs, structures, and compiler characteristics.
50273c00b8SmrgAC_SYS_LARGEFILE
51273c00b8Smrg
527a0395d0Smrg# Checks for pkg-config packages
538abc0ccfSmrgPKG_CHECK_MODULES(XAUTH, x11 xau xext xmuu xproto >= 7.0.17)
547a0395d0Smrg
55765b7306Smrg# Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
56765b7306Smrg# was not expanded, since xauth with no address support is rather broken.
57765b7306Smrg#
58765b7306Smrg# If you're seeing an error here, be sure you installed the lib/xtrans module
59765b7306Smrg# first and if it's not in the default location, that you set the ACLOCAL
60765b7306Smrg# environment variable to find it, such as:
61765b7306Smrg#       ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
62765b7306Smrgm4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
63765b7306Smrg
647a0395d0Smrg# Transport selection macro from xtrans.m4
6596402570Smrg# Needed to set *CONN defines for gethost.c & parsedpy.c
667a0395d0SmrgXTRANS_CONNECTION_FLAGS
677a0395d0Smrg
68f6d57fdeSmrg# Checks for library functions.
69f6d57fdeSmrgAC_CHECK_FUNCS([getaddrinfo inet_ntop reallocarray strlcpy])
70f6d57fdeSmrg
717a0395d0SmrgXORG_WITH_LINT
727a0395d0Smrg
732852888eSmrgAC_CONFIG_FILES([
742852888eSmrg	Makefile
758abc0ccfSmrg	tests/Makefile
762852888eSmrg	man/Makefile])
772852888eSmrgAC_OUTPUT
78