1a6d9b409Smrgdnl  Copyright 2005 Red Hat, Inc.
2a6d9b409Smrgdnl 
3a6d9b409Smrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
4a6d9b409Smrgdnl  documentation for any purpose is hereby granted without fee, provided that
5a6d9b409Smrgdnl  the above copyright notice appear in all copies and that both that
6a6d9b409Smrgdnl  copyright notice and this permission notice appear in supporting
7a6d9b409Smrgdnl  documentation, and that the name of Red Hat not be used in
8a6d9b409Smrgdnl  advertising or publicity pertaining to distribution of the software without
9a6d9b409Smrgdnl  specific, written prior permission.  Red Hat makes no
10a6d9b409Smrgdnl  representations about the suitability of this software for any purpose.  It
11a6d9b409Smrgdnl  is provided "as is" without express or implied warranty.
12a6d9b409Smrgdnl 
13a6d9b409Smrgdnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
14a6d9b409Smrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
15a6d9b409Smrgdnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
16a6d9b409Smrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
17a6d9b409Smrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18a6d9b409Smrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19a6d9b409Smrgdnl  PERFORMANCE OF THIS SOFTWARE.
20a6d9b409Smrgdnl
21a6d9b409Smrgdnl Process this file with autoconf to create configure.
22a6d9b409Smrg
231e5fa1c5Smrg# Initialize Autoconf
241e5fa1c5SmrgAC_PREREQ([2.60])
25838f5b0bSmrgAC_INIT([sessreg], [1.1.4],
2692e95ad1Smrg	[https://gitlab.freedesktop.org/xorg/app/sessreg/-/issues], [sessreg])
271e5fa1c5SmrgAC_CONFIG_SRCDIR([Makefile.am])
281e5fa1c5SmrgAC_CONFIG_HEADERS([config.h])
291e5fa1c5SmrgAC_USE_SYSTEM_EXTENSIONS
301e5fa1c5SmrgAC_SYS_LARGEFILE
31a6d9b409Smrg
321e5fa1c5Smrg# Initialize Automake
3392e95ad1SmrgAM_INIT_AUTOMAKE([foreign dist-xz])
34a6d9b409Smrg
35a097bd00Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
36efda2da8Smrgm4_ifndef([XORG_MACROS_VERSION],
37a097bd00Smrg	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
38a097bd00SmrgXORG_MACROS_VERSION(1.8)
391e5fa1c5SmrgXORG_DEFAULT_OPTIONS
401e5fa1c5SmrgXORG_WITH_LINT
41a6d9b409Smrg
421e5fa1c5Smrg# Checks for header files.
43a097bd00SmrgAC_CHECK_HEADERS([lastlog.h pwd.h utmp.h utmpx.h sys/param.h])
44a6d9b409Smrg
451e5fa1c5Smrg# Checks for typedefs, structures, and compiler characteristics.
46a097bd00SmrgAC_CHECK_MEMBERS([
47a097bd00Smrg	struct utmp.ut_host,
48a097bd00Smrg	struct utmp.ut_id,
49a097bd00Smrg	struct utmp.ut_pid,
50a097bd00Smrg	struct utmp.ut_type], [], [], [
51a097bd00Smrg	#include <sys/types.h>
52a097bd00Smrg	#include <utmp.h>
53a097bd00Smrg	])
54a097bd00SmrgAC_CHECK_MEMBERS([struct utmpx.ut_syslen], [], [], [#include <utmpx.h>])
55a097bd00SmrgAC_CHECK_TYPES([
56a097bd00Smrg	struct lastlog], [], [],[
57a097bd00Smrg	#include <sys/types.h>
58a097bd00Smrg	#ifdef HAVE_UTMP_H
59a097bd00Smrg	#include <utmp.h>
60a097bd00Smrg	#endif
61a097bd00Smrg	#ifdef HAVE_LASTLOG_H
62a097bd00Smrg	#include <lastlog.h>
63a097bd00Smrg	#endif
64a097bd00Smrg	])
65a097bd00Smrg
66a097bd00Smrg# Checks for library functions.
67a097bd00SmrgAC_CHECK_FUNCS([pututline updwtmpx utmpxname])
68a6d9b409Smrg
6992e95ad1Smrg# Obtain compiler/linker options for dependencies
70b91640d3SmrgPKG_CHECK_MODULES(SESSREG, [xproto >= 7.0.25])
71a6d9b409Smrg
72a097bd00SmrgAC_CONFIG_FILES([
73a097bd00Smrg	Makefile
74a097bd00Smrg	man/Makefile])
75a097bd00SmrgAC_OUTPUT
76