configure.ac revision da1f2d5d
11bedbe3fSmrg# 21bedbe3fSmrg# Copyright © 2003 Keith Packard, Noah Levitt 31bedbe3fSmrg# 41bedbe3fSmrg# Permission to use, copy, modify, distribute, and sell this software and its 51bedbe3fSmrg# documentation for any purpose is hereby granted without fee, provided that 61bedbe3fSmrg# the above copyright notice appear in all copies and that both that 71bedbe3fSmrg# copyright notice and this permission notice appear in supporting 81bedbe3fSmrg# documentation, and that the name of Keith Packard not be used in 91bedbe3fSmrg# advertising or publicity pertaining to distribution of the software without 101bedbe3fSmrg# specific, written prior permission. Keith Packard makes no 111bedbe3fSmrg# representations about the suitability of this software for any purpose. It 121bedbe3fSmrg# is provided "as is" without express or implied warranty. 131bedbe3fSmrg# 141bedbe3fSmrg# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 151bedbe3fSmrg# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 161bedbe3fSmrg# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 171bedbe3fSmrg# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 181bedbe3fSmrg# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 191bedbe3fSmrg# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 201bedbe3fSmrg# PERFORMANCE OF THIS SOFTWARE. 211bedbe3fSmrg# 22ba6a1819Smrg 231bedbe3fSmrg# Initialize Autoconf 24549e21daSmrgAC_PREREQ([2.60]) 25da1f2d5dSmrgAC_INIT([libFS], [1.0.9], 26da1f2d5dSmrg [https://gitlab.freedesktop.org/xorg/lib/libfs/-/issues], [libFS]) 271bedbe3fSmrgAC_CONFIG_SRCDIR([Makefile.am]) 281bedbe3fSmrgAC_CONFIG_HEADERS([config.h]) 29ba6a1819Smrg 301bedbe3fSmrg# Initialize Automake 31da1f2d5dSmrgAM_INIT_AUTOMAKE([foreign dist-xz]) 32ba6a1819Smrg 336af7124fSmrg# Set common system defines for POSIX extensions, such as _GNU_SOURCE 346af7124fSmrg# Must be called before any macros that run the compiler (like 356af7124fSmrg# AC_PROG_LIBTOOL) to avoid autoconf errors. 366af7124fSmrgAC_USE_SYSTEM_EXTENSIONS 376af7124fSmrg 381bedbe3fSmrg# Initialize libtool 39ba6a1819SmrgAC_PROG_LIBTOOL 40ba6a1819Smrg 411bedbe3fSmrg# Require X.Org macros 1.8 or later 421bedbe3fSmrgm4_ifndef([XORG_MACROS_VERSION], 431bedbe3fSmrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 441bedbe3fSmrgXORG_MACROS_VERSION(1.8) 451bedbe3fSmrgXORG_DEFAULT_OPTIONS 461bedbe3fSmrgXORG_CHECK_MALLOC_ZERO 47549e21daSmrg 48da1f2d5dSmrg# Obtain compiler/linker options for dependencies 491bedbe3fSmrgPKG_CHECK_MODULES(FS, xproto >= 7.0.17 fontsproto xtrans) 50ba6a1819Smrg 511bedbe3fSmrg# Find needed libraries for TCP sockets (pre-pended in $LIBS) 52ba6a1819SmrgXTRANS_CONNECTION_FLAGS 53ba6a1819Smrg 546af7124fSmrg# Checks for library functions. 55fe4c343aSmrgAC_CHECK_FUNCS([strlcpy strnlen]) 56da1f2d5dSmrgAC_REPLACE_FUNCS([reallocarray]) 576af7124fSmrg 581bedbe3fSmrg# Allow checking code with lint, sparse, etc. 59ba6a1819SmrgXORG_WITH_LINT 60ba6a1819SmrgXORG_LINT_LIBRARY([FS]) 61ba6a1819Smrg 621bedbe3fSmrgAC_CONFIG_FILES([Makefile 631bedbe3fSmrg src/Makefile 641bedbe3fSmrg test/Makefile 651bedbe3fSmrg libfs.pc]) 661bedbe3fSmrgAC_OUTPUT 67