configure.ac revision a3129944
1 2# Initialize Autoconf 3AC_PREREQ([2.60]) 4AC_INIT([libICE], [1.0.10], 5 [https://gitlab.freedesktop.org/xorg/lib/libICE/issues], [libICE]) 6AC_CONFIG_SRCDIR([Makefile.am]) 7AC_CONFIG_HEADERS([config.h]) 8 9# Set common system defines for POSIX extensions, such as _GNU_SOURCE 10# Must be called before any macros that run the compiler (like 11# AC_PROG_LIBTOOL or XORG_DEFAULT_OPTIONS) to avoid autoconf errors. 12AC_USE_SYSTEM_EXTENSIONS 13 14# Initialize Automake 15AM_INIT_AUTOMAKE([foreign dist-bzip2]) 16 17# Initialize libtool 18AC_PROG_LIBTOOL 19 20# Require xorg-macros minimum of 1.12 for DocBook external references 21m4_ifndef([XORG_MACROS_VERSION], 22 [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])]) 23XORG_MACROS_VERSION(1.12) 24XORG_DEFAULT_OPTIONS 25XORG_ENABLE_DOCS 26XORG_ENABLE_SPECS 27XORG_WITH_XMLTO(0.0.22) 28XORG_WITH_FOP 29XORG_WITH_XSLTPROC 30XORG_CHECK_SGML_DOCTOOLS(1.8) 31 32# Obtain compiler/linker options for depedencies 33PKG_CHECK_MODULES(ICE, xproto xtrans) 34 35# Transport selection macro from xtrans.m4 36XTRANS_CONNECTION_FLAGS 37AC_DEFINE(ICE_t, 1, [Xtrans transport type]) 38AC_DEFINE(TRANS_CLIENT, 1, [Xtrans transport client code]) 39AC_DEFINE(TRANS_SERVER, 1, [Xtrans transport server code]) 40 41# Checks for library functions. 42AC_CHECK_LIB([bsd], [arc4random_buf]) 43AC_CHECK_FUNCS([asprintf arc4random_buf getentropy]) 44 45# Allow checking code with lint, sparse, etc. 46XORG_WITH_LINT 47XORG_LINT_LIBRARY([ICE]) 48LINT_FLAGS="${LINT_FLAGS} ${ICE_CFLAGS} ${XTRANS_CFLAGS}" 49 50AC_CONFIG_FILES([Makefile 51 doc/Makefile 52 specs/Makefile 53 src/Makefile 54 ice.pc]) 55AC_OUTPUT 56