1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
dnl
dnl Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
dnl to deal in the Software without restriction, including without limitation
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
dnl and/or sell copies of the Software, and to permit persons to whom the
dnl Software is furnished to do so, subject to the following conditions:
dnl
dnl The above copyright notice and this permission notice (including the next
dnl paragraph) shall be included in all copies or substantial portions of the
dnl Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dnl DEALINGS IN THE SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xscope], [1.3.99.901],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xscope])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
AC_USE_SYSTEM_EXTENSIONS
XORG_DEFAULT_OPTIONS
AC_ARG_ENABLE(xtrans, AS_HELP_STRING([--enable-xtrans],
[Use xtrans for socket connections (default: auto)]),
[XTRANS=$enableval], [XTRANS=auto])
if test "x$XTRANS" = xauto ; then
PKG_CHECK_EXISTS(xtrans, [XTRANS=yes], [XTRANS=no])
fi
if test "x$XTRANS" = xyes ; then
dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
dnl was not expanded, since xscope with no transport types is rather useless.
dnl
dnl If you're seeing an error here, be sure you installed the lib/xtrans module
dnl first and if it's not in the default location, that you set the ACLOCAL
dnl environment variable to find it, such as:
dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
m4_pattern_forbid([XTRANS_CONNECTION_FLAGS])
# Transport selection macro from xtrans.m4
XTRANS_CONNECTION_FLAGS
XTRANS_PKG='xtrans'
AC_DEFINE([USE_XTRANS], [1], [Use xtrans for socket connection code])
else
# SVR4 hides these in libraries other than libc
AC_SEARCH_LIBS(socket, [socket])
AC_SEARCH_LIBS(gethostbyname, [nsl])
fi
# Checks for pkg-config packages
PKG_CHECK_MODULES(XSCOPE, [xproto >= 7.0.17 $XTRANS_PKG])
AC_CHECK_FUNCS([getdtablesize])
AC_CHECK_HEADERS([sys/filio.h langinfo.h])
dnl Allow checking code with lint, sparse, etc.
XORG_WITH_LINT
AC_CONFIG_FILES([
Makefile
man/Makefile])
AC_OUTPUT
|