2 dnl Copyright 2005 Red Hat, Inc.
4 dnl Permission to use, copy, modify, distribute, and sell this software and its
5 dnl documentation for any purpose is hereby granted without fee, provided that
6 dnl the above copyright notice appear in all copies and that both that
7 dnl copyright notice and this permission notice appear in supporting
8 dnl documentation, and that the name of Red Hat not be used in
9 dnl advertising or publicity pertaining to distribution of the software without
10 dnl specific, written prior permission. Red Hat makes no
11 dnl representations about the suitability of this software for any purpose. It
12 dnl is provided "as is" without express or implied warranty.
14 dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 dnl PERFORMANCE OF THIS SOFTWARE.
22 dnl Process this file with autoconf to create configure.
25 AC_INIT(xdpyinfo,[0.99.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xdpyinfo)
26 AM_INIT_AUTOMAKE([dist-bzip2])
29 AM_CONFIG_HEADER(config.h)
34 # Checks for pkg-config packages
35 PKG_CHECK_MODULES(XDPYINFO, xext x11 xtst)
36 AC_SUBST(XDPYINFO_CFLAGS)
37 AC_SUBST(XDPYINFO_LIBS)
39 PKG_CHECK_MODULES(DPY_XEXT, xextproto xext,
40 [SAVE_CPPFLAGS="$CPPFLAGS"
41 CPPFLAGS="$CPPFLAGS $DPY_XEXTPROTO_CFLAGS"
42 AC_CHECK_HEADERS([X11/extensions/multibuf.h X11/extensions/XShm.h],,,[#include <X11/Xlib.h>])
43 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
45 PKG_CHECK_MODULES(DPY_XKB, kbproto x11,
46 [SAVE_CPPFLAGS="$CPPFLAGS"
47 CPPFLAGS="$CPPFLAGS $DPY_XKB_CFLAGS"
48 AC_CHECK_HEADERS([X11/extensions/XKB.h X11/XKBlib.h],,,[#include <X11/Xlib.h>])
49 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
51 PKG_CHECK_MODULES(DPY_XF86VIDMODE, xf86vidmodeproto xxf86vm,
52 [SAVE_CPPFLAGS="$CPPFLAGS"
53 CPPFLAGS="$CPPFLAGS $DPY_XF86VIDMODE_CFLAGS"
54 AC_CHECK_HEADERS([X11/extensions/xf86vmode.h X11/extensions/xf86vmstr.h],,,[#include <X11/Xlib.h>])
55 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
57 PKG_CHECK_MODULES(DPY_XF86DGA, xf86dgaproto xxf86dga,
58 [SAVE_CPPFLAGS="$CPPFLAGS"
59 CPPFLAGS="$CPPFLAGS $DPY_XF86DGA_CFLAGS"
60 AC_CHECK_HEADERS([X11/extensions/xf86dga.h X11/extensions/xf86dgastr.h],,,
61 [#include <X11/Xlib.h>
62 #include <X11/Xproto.h>])
63 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
65 PKG_CHECK_MODULES(DPY_XF86MISC, xf86miscproto xxf86misc,
66 [SAVE_CPPFLAGS="$CPPFLAGS"
67 CPPFLAGS="$CPPFLAGS $DPY_XF86MISC_CFLAGS"
68 AC_CHECK_HEADERS([X11/extensions/xf86misc.h X11/extensions/xf86mscstr.h],,,
69 [#include <X11/Xlib.h>
70 #include <X11/Xproto.h>])
71 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
73 PKG_CHECK_MODULES(DPY_XINPUT, inputproto xi,
74 [SAVE_CPPFLAGS="$CPPFLAGS"
75 CPPFLAGS="$CPPFLAGS $DPY_XINPUT_CFLAGS"
76 AC_CHECK_HEADERS([X11/extensions/XInput.h],,,[#include <X11/Xlib.h>])
77 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
79 PKG_CHECK_MODULES(DPY_XRENDER, renderproto xrender,
80 [SAVE_CPPFLAGS="$CPPFLAGS"
81 CPPFLAGS="$CPPFLAGS $DPY_XRENDER_CFLAGS"
82 AC_CHECK_HEADERS([X11/extensions/Xrender.h],,,[#include <X11/Xlib.h>])
83 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
85 PKG_CHECK_MODULES(DPY_XINERAMA, xineramaproto xinerama,
86 [SAVE_CPPFLAGS="$CPPFLAGS"
87 CPPFLAGS="$CPPFLAGS $DPY_XINERAMA_CFLAGS"
88 AC_CHECK_HEADERS([X11/extensions/Xinerama.h],,,[#include <X11/Xlib.h>])
89 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
91 PKG_CHECK_MODULES(DPY_DMX, dmxproto dmx,
92 [SAVE_CPPFLAGS="$CPPFLAGS"
93 CPPFLAGS="$CPPFLAGS $DPY_DMX_CFLAGS"
94 AC_CHECK_HEADERS([X11/extensions/dmxext.h],,,[#include <X11/Xlib.h>])
95 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
97 PKG_CHECK_MODULES(DPY_XPRINT, printproto xp,
98 [SAVE_CPPFLAGS="$CPPFLAGS"
99 CPPFLAGS="$CPPFLAGS $DPY_XPRINT_CFLAGS"
100 AC_CHECK_HEADERS([X11/extensions/Print.h],,,[#include <X11/Xlib.h>])
101 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
103 XORG_MANPAGE_SECTIONS
106 AC_OUTPUT([Makefile])