14
14
AM_CONFIG_HEADER([src/config.h])
15
15
AC_CONFIG_HEADER([include/X11/XlibConf.h])
17
# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG, XORG_WITH_LINT
18
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
19
XORG_MACROS_VERSION(1.2)
17
# Require xorg-macros: XORG_DEFAULT_OPTIONS, XORG_CHANGELOG, XORG_WITH_LINT
18
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
19
XORG_MACROS_VERSION(1.3)
21
21
# Set common system defines for POSIX extensions, such as _GNU_SOURCE
22
22
# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
43
# Find perl for "make check" tests in nls/localerules.in
45
AC_HELP_STRING([--with-perl=<path>],
46
[path to perl interpreter for build-time tests]),
47
[PERL=$withval ; AC_MSG_CHECKING([perl]) ;
48
AC_MSG_RESULT([(from --with-perl) $PERL])],
49
AC_CHECK_PROGS([PERL], [perl], [no]))
50
AM_CONDITIONAL(HAVE_PERL, test x$PERL != xno)
43
52
# Build with XCB support?
45
54
AC_HELP_STRING([--with-xcb], [use XCB for low-level protocol implementation]),
54
63
case "$ac_cv_use_xcb" in
56
65
X11_REQUIRES="xau xcmiscproto bigreqsproto"
57
X11_EXTRA_DEPS="xau xdmcp"
58
PKG_CHECK_MODULES(XDMCP, xdmcp)
59
AC_CHECK_LIB(Xdmcp, XdmcpWrap, [xdmauth="yes"], [xdmauth="no"], [$XDMCP_LIBS])
67
PKG_CHECK_MODULES(XDMCP, xdmcp,
68
AC_CHECK_LIB(Xdmcp, XdmcpWrap,
70
AC_CHECK_LIB(Xdmcp, XdmcpWrap, [xdmauth="yes"], [xdmauth="no"], [$XDMCP_LIBS])
71
X11_EXTRA_DEPS="$X11_EXTRA_DEPS xdmcp"
60
78
AC_DEFINE(USE_XCB, 0, [Use XCB for low-level protocol implementation])
76
94
dnl first and if it's not in the default location, that you set the ACLOCAL
77
95
dnl environment variable to find it, such as:
78
96
dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
79
m4_pattern_forbid(XTRANS_CONNECTION_FLAGS)
97
m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
81
99
# Transport selection macro from xtrans.m4
82
100
XTRANS_CONNECTION_FLAGS
164
182
# Checks for header files.
166
dnl AC_CHECK_HEADERS([stdio.h stdlib.h math.h])
184
AC_CHECK_HEADERS([sys/select.h])
168
186
# Checks for typedefs, structures, and compiler characteristics.
321
339
[Disable XKB support *EXPERIMENTAL*]),
322
340
[XKB=$enableval],[XKB=yes])
324
XORG_MANPAGE_SECTIONS
326
342
AC_ARG_ENABLE(man-pages,
327
343
AC_HELP_STRING([--enable-man-pages=section],
328
344
[Choose manual section for installing man pages]),
410
426
XERRORDB="${X11_DATADIR}/XErrorDB"
411
427
AC_DEFINE_DIR(XERRORDB, XERRORDB, [Location of error message database])
414
429
XORG_CHECK_MALLOC_ZERO
431
# Specification documents are currently provided in troff format
432
AC_ARG_VAR([GROFF], [Path to a groff executable that supports -ms])
433
AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin])
435
AC_ARG_VAR([PS2PDF], [Path to a ps2pdf executable])
436
AC_PATH_PROGS([PS2PDF], [ps2pdf], [none], [$PATH:/usr/gnu/bin])
438
if test "x${GROFF}" != xnone ; then
439
AC_MSG_CHECKING([whether ${GROFF} -ms works])
440
if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
446
AC_MSG_RESULT([${groff_ms_works}])
449
AC_MSG_CHECKING([whether to build specifications])
450
AC_ARG_ENABLE(specs, AC_HELP_STRING([--enable-specs],
451
[Enable building of specification docs]),
452
[build_specs="${enableval}"], [build_specs="auto"])
454
if test "x${build_specs}" = xauto; then
455
if test "x${GROFF}" = xnone ; then
461
AC_MSG_RESULT([${build_specs}])
462
if test "x${build_specs}" = xyes && test "x${GROFF}" = xnone ; then
463
AC_MSG_ERROR([can't build documentation without groff])
466
AM_CONDITIONAL(BUILD_SPECS, [test x$build_specs = xyes])
467
AM_CONDITIONAL(HAVE_PS2PDF, [test x$PS2PDF != xnone])
418
470
AC_OUTPUT([Makefile