configure.ac revision aadd013e
1dnl Process this file with autoconf to create configure.
2
3# Initialize Autoconf
4AC_PREREQ([2.60])
5AC_INIT([xhost], [1.0.8],
6        [https://gitlab.freedesktop.org/xorg/app/xhost/issues], [xhost])
7AC_CONFIG_SRCDIR([Makefile.am])
8AC_CONFIG_HEADERS([config.h])
9
10# Initialize Automake
11AM_INIT_AUTOMAKE([foreign dist-bzip2])
12
13# Set common system defines for POSIX extensions, such as _GNU_SOURCE
14# Must be called before any macros that run the compiler (like
15# XORG_DEFAULT_OPTIONS) to avoid autoconf errors.
16AC_USE_SYSTEM_EXTENSIONS
17
18# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
19m4_ifndef([XORG_MACROS_VERSION],
20	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
21XORG_MACROS_VERSION(1.8)
22XORG_DEFAULT_OPTIONS
23
24# Checks for pkg-config packages
25# - Both CFLAGS & LIBS needed:
26PKG_CHECK_MODULES(XHOST, [xproto >= 7.0.22 x11 xmuu])
27# - Only CFLAGS needed, not libs:
28PKG_CHECK_MODULES(XAU, xau)
29
30# Transport selection macro from xtrans.m4
31XTRANS_CONNECTION_FLAGS
32
33# Secure RPC detection macro from xtrans.m4
34XTRANS_SECURE_RPC_FLAGS
35
36# Link with winsock if mingw target
37case $host_os in
38 *mingw*)
39  AC_CHECK_LIB([ws2_32],[main])
40  ;;
41 *)
42  ;;
43esac
44
45# Checks for library functions.
46AC_CHECK_FUNCS([inet_aton])
47
48AC_CONFIG_FILES([
49	Makefile
50	man/Makefile])
51AC_OUTPUT
52