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])
33 AC_USE_SYSTEM_EXTENSIONS
37 AM_INIT_AUTOMAKE([foreign dist-bzip2])
38 AM_PATH_PYTHON([3],, [:])
41 # Checks for functions, headers, structures, etc.
42 AC_CHECK_HEADERS([termios.h])
43 AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT
44 #include <sys/sysinfo.h>
46 AC_CHECK_FUNCS([swapctl])
47 AC_CHECK_FUNCS([asprintf])
53 # Require X.Org macros 1.16 or later for XORG_TESTSET_CFLAG
54 m4_ifndef([XORG_MACROS_VERSION],
55 [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])])
56 XORG_MACROS_VERSION(1.16)
59 PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.38 libdrm])
60 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
63 AC_ARG_ENABLE(nouveau,
64 AS_HELP_STRING([--disable-nouveau],
65 [Enable use of nouveau API for prime tests (default: enabled)]),
66 [NOUVEAU=$enableval], [NOUVEAU=yes])
67 if test "x$NOUVEAU" = xyes; then
68 PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm_nouveau >= 2.4.33])
69 AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau support])
71 AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
75 PKG_CHECK_MODULES(CAIRO, cairo)
76 PKG_CHECK_MODULES(LIBUDEV, [libudev], [udev=yes], [udev=no])
77 if test x"$udev" = xyes; then
78 AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
80 PKG_CHECK_MODULES(GLIB, glib-2.0)
82 # -----------------------------------------------------------------------------
83 # Configuration options
84 # -----------------------------------------------------------------------------
85 # Define a configure option for the shadder debugger
86 AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger],
87 [Enable shader debugging support [autodetected]]),
88 [BUILD_SHADER_DEBUGGER="$enableval"], [BUILD_SHADER_DEBUGGER=auto])
90 # Shadder debugger depends on python3, intel-genasm and objcopy
91 if test "x$BUILD_SHADER_DEBUGGER" != xno; then
92 # Check Python 3 is installed
93 if test "$PYTHON" = ":" ; then
94 if test "x$BUILD_SHADER_DEBUGGER" = xyes; then
95 AC_MSG_ERROR([Shader debugger requested, python version 3 not found.])
97 BUILD_SHADER_DEBUGGER=no
100 # Check for the Intel Chipset assembler compiler
101 AC_PATH_PROGS([GEN4ASM], intel-gen4asm)
102 if test -z "$GEN4ASM" ; then
103 if test "x$BUILD_SHADER_DEBUGGER" = xyes; then
104 AC_MSG_ERROR([Shader debugger requested, but intel-gen4asm not found.])
106 BUILD_SHADER_DEBUGGER=no
109 # Check for the objcopy GNU binary utiliy command
110 AC_PATH_PROGS([OBJCOPY], objcopy)
111 if test -z "$OBJCOPY" ; then
112 if test "x$BUILD_SHADER_DEBUGGER" = xyes; then
113 AC_MSG_ERROR([Shader debugger requested, but objcopy command not found.])
115 BUILD_SHADER_DEBUGGER=no
120 AM_CONDITIONAL(BUILD_SHADER_DEBUGGER, [test "x$BUILD_SHADER_DEBUGGER" != xno])
121 # -----------------------------------------------------------------------------
123 # To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt
124 XORG_TESTSET_CFLAG([THREAD_CFLAGS], [-pthread], [-mt])
125 AC_SUBST([THREAD_CFLAGS])
137 debugger/system_routine/Makefile