configure.ac revision 95fdd44c
13544ea2eSmrgdnl Process this file with autoconf to create configure.
264ce7165Smrg
33544ea2eSmrg# Initialize Autoconf
4169a0819SmrgAC_PREREQ([2.60])
595fdd44cSmrgAC_INIT([xhost], [1.0.7],
6169a0819Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xhost])
73544ea2eSmrgAC_CONFIG_SRCDIR([Makefile.am])
83544ea2eSmrgAC_CONFIG_HEADERS([config.h])
93544ea2eSmrg
103544ea2eSmrg# Initialize Automake
11169a0819SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
1295fdd44cSmrg
1395fdd44cSmrg# Set common system defines for POSIX extensions, such as _GNU_SOURCE
1495fdd44cSmrg# Must be called before any macros that run the compiler (like
1595fdd44cSmrg# XORG_DEFAULT_OPTIONS) to avoid autoconf errors.
1695fdd44cSmrgAC_USE_SYSTEM_EXTENSIONS
1764ce7165Smrg
18169a0819Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
19fb23d3a8Smrgm4_ifndef([XORG_MACROS_VERSION],
20169a0819Smrg	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
21169a0819SmrgXORG_MACROS_VERSION(1.8)
223544ea2eSmrgXORG_DEFAULT_OPTIONS
2364ce7165Smrg
2464ce7165Smrg# Checks for pkg-config packages
253544ea2eSmrg# - Both CFLAGS & LIBS needed:
2681440437SmrgPKG_CHECK_MODULES(XHOST, [xproto >= 7.0.22 x11 xmuu])
273544ea2eSmrg# - Only CFLAGS needed, not libs:
283544ea2eSmrgPKG_CHECK_MODULES(XAU, xau)
2964ce7165Smrg
3064ce7165Smrg# Transport selection macro from xtrans.m4
3164ce7165SmrgXTRANS_CONNECTION_FLAGS
3264ce7165Smrg
3364ce7165Smrg# Secure RPC detection macro from xtrans.m4
3464ce7165SmrgXTRANS_SECURE_RPC_FLAGS
3564ce7165Smrg
3681440437Smrg# Link with winsock if mingw target
3781440437Smrgcase $host_os in
3881440437Smrg *mingw*)
3981440437Smrg  AC_CHECK_LIB([ws2_32],[main])
4081440437Smrg  ;;
4181440437Smrg *)
4281440437Smrg  ;;
4381440437Smrgesac
4481440437Smrg
453544ea2eSmrgAC_CONFIG_FILES([
463544ea2eSmrg	Makefile
473544ea2eSmrg	man/Makefile])
483544ea2eSmrgAC_OUTPUT
49