configure.ac revision 838f5b0b
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
23# Initialize Autoconf
24AC_PREREQ([2.60])
25AC_INIT([sessreg], [1.1.4],
26	[https://gitlab.freedesktop.org/xorg/app/sessreg/-/issues], [sessreg])
27AC_CONFIG_SRCDIR([Makefile.am])
28AC_CONFIG_HEADERS([config.h])
29AC_USE_SYSTEM_EXTENSIONS
30AC_SYS_LARGEFILE
31
32# Initialize Automake
33AM_INIT_AUTOMAKE([foreign dist-xz])
34
35# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
36m4_ifndef([XORG_MACROS_VERSION],
37	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
38XORG_MACROS_VERSION(1.8)
39XORG_DEFAULT_OPTIONS
40XORG_WITH_LINT
41
42# Checks for header files.
43AC_CHECK_HEADERS([lastlog.h pwd.h utmp.h utmpx.h sys/param.h])
44
45# Checks for typedefs, structures, and compiler characteristics.
46AC_CHECK_MEMBERS([
47	struct utmp.ut_host,
48	struct utmp.ut_id,
49	struct utmp.ut_pid,
50	struct utmp.ut_type], [], [], [
51	#include <sys/types.h>
52	#include <utmp.h>
53	])
54AC_CHECK_MEMBERS([struct utmpx.ut_syslen], [], [], [#include <utmpx.h>])
55AC_CHECK_TYPES([
56	struct lastlog], [], [],[
57	#include <sys/types.h>
58	#ifdef HAVE_UTMP_H
59	#include <utmp.h>
60	#endif
61	#ifdef HAVE_LASTLOG_H
62	#include <lastlog.h>
63	#endif
64	])
65
66# Checks for library functions.
67AC_CHECK_FUNCS([pututline updwtmpx utmpxname])
68
69# Obtain compiler/linker options for dependencies
70PKG_CHECK_MODULES(SESSREG, [xproto >= 7.0.25])
71
72AC_CONFIG_FILES([
73	Makefile
74	man/Makefile])
75AC_OUTPUT
76