1 # Copyright 2005 Adam Jackson.
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # on the rights to use, copy, modify, merge, publish, distribute, sub
7 # license, and/or sell copies of the Software, and to permit persons to whom
8 # the Software is furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 # ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 # Process this file with autoconf to produce a configure script
24 AC_INIT([intel-gpu-tools],
26 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
29 AC_CONFIG_SRCDIR([Makefile.am])
30 AC_CONFIG_HEADERS([config.h])
31 AC_CONFIG_MACRO_DIR([m4])
32 AC_CONFIG_AUX_DIR([build-aux])
34 AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2])
35 AM_MAINTAINER_MODE([enable])
37 # Support silent build rules, requires at least automake-1.11. Disable
38 # by either passing --disable-silent-rules to configure or passing V=1
40 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
42 # Checks for programs.
49 LT_INIT([disable-static])
51 PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.23], have_drm=yes, have_drm=no)
52 if test "x$have_drm" = "xyes"; then
53 AC_DEFINE([HAVE_DRM], 1, [Define to 1 if we have DRM support])
55 AM_CONDITIONAL(HAVE_DRM, test "x$have_drm" = "xyes")
57 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
59 PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
60 if test "x$HAVE_CAIRO" = xyes; then
61 AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support])
63 AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes])
65 PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
66 if test "x$HAVE_LIBUDEV" = xyes; then
67 AC_DEFINE(HAVE_LIBUDEV, 1, [Have libudev support])
69 AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
71 PKG_CHECK_MODULES(GLIB, glib-2.0, [HAVE_GLIB=yes], [HAVE_GLIB=no])
72 if test "x$HAVE_GLIB" = xyes; then
73 AC_DEFINE(HAVE_GLIB, 1, [Have glib support])
75 AM_CONDITIONAL(HAVE_GLIB, [test "x$HAVE_GLIB" = xyes])
77 dnl Use lots of warning flags with GCC
81 if test "x$GCC" = "xyes"; then
82 WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
83 -Wmissing-prototypes -Wmissing-declarations \
84 -Wnested-externs -fno-strict-aliasing"
87 AC_SUBST([WARN_CFLAGS])
89 AC_ARG_ENABLE(shader-debugger,
90 AS_HELP_STRING([--enable-shader-debugger],
91 [Enable shader debugging support [default=no]]),
92 [SHADER_DEBUGGER="$enableval"],
94 AM_CONDITIONAL(HAVE_SHADER_DEBUGGER, [test "x$SHADER_DEBUGGER" = xyes])
95 if test "x$SHADER_DEBUGGER" = xyes; then
96 AC_DEFINE(HAVE_SHADER_DEBUGGER, 1, [Have shader debugging support])
99 m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
100 XORG_MACROS_VERSION(1.3)