1#
2#  Copyright © 2003 Keith Packard, Noah Levitt
3#
4#  Permission to use, copy, modify, distribute, and sell this software and its
5#  documentation for any purpose is hereby granted without fee, provided that
6#  the above copyright notice appear in all copies and that both that
7#  copyright notice and this permission notice appear in supporting
8#  documentation, and that the name of Keith Packard not be used in
9#  advertising or publicity pertaining to distribution of the software without
10#  specific, written prior permission.  Keith Packard makes no
11#  representations about the suitability of this software for any purpose.  It
12#  is provided "as is" without express or implied warranty.
13#
14#  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16#  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20#  PERFORMANCE OF THIS SOFTWARE.
21#
22
23# Initialize Autoconf
24AC_PREREQ([2.70])
25AC_INIT([libFS], [1.0.10],
26        [https://gitlab.freedesktop.org/xorg/lib/libfs/-/issues], [libFS])
27AC_CONFIG_SRCDIR([Makefile.am])
28AC_CONFIG_HEADERS([config.h])
29AC_CONFIG_MACRO_DIRS([m4])
30
31# Initialize Automake
32AM_INIT_AUTOMAKE([foreign dist-xz])
33
34# Set common system defines for POSIX extensions, such as _GNU_SOURCE
35# Must be called before any macros that run the compiler (like
36# LT_INIT) to avoid autoconf errors.
37AC_USE_SYSTEM_EXTENSIONS
38
39# Initialize libtool
40LT_INIT
41
42# Require X.Org macros 1.8 or later
43m4_ifndef([XORG_MACROS_VERSION],
44          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
45XORG_MACROS_VERSION(1.8)
46XORG_DEFAULT_OPTIONS
47XORG_CHECK_MALLOC_ZERO
48
49# Obtain compiler/linker options for dependencies
50PKG_CHECK_MODULES(FS, xproto >= 7.0.17 fontsproto xtrans)
51
52# Find needed libraries for TCP sockets (pre-pended in $LIBS)
53XTRANS_CONNECTION_FLAGS
54
55# Checks for library functions.
56AC_CHECK_FUNCS([strlcpy strnlen])
57AC_REPLACE_FUNCS([reallocarray])
58
59# Allow checking code with lint, sparse, etc.
60XORG_WITH_LINT
61XORG_LINT_LIBRARY([FS])
62
63AC_CONFIG_FILES([Makefile
64		src/Makefile
65		test/Makefile
66		libfs.pc])
67AC_OUTPUT
68