intel-gpu-tools/debugging: shader debugger
[platform/upstream/intel-gpu-tools.git] / configure.ac
1 #  Copyright 2005 Adam Jackson.
2 #
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:
9 #
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
12 #  Software.
13 #
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.
20 #
21 # Process this file with autoconf to produce a configure script
22
23 AC_PREREQ([2.63])
24 AC_INIT([intel-gpu-tools],
25         [1.0.2],
26         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
27         [intel-gpu-tools])
28
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
34 AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2])
35 AM_MAINTAINER_MODE([enable])
36
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
39 # to make
40 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
41
42 # Checks for programs.
43 AC_PROG_CC
44 AC_PROG_CC_C99
45 AM_PROG_CC_C_O
46
47 # Initialize libtool
48 LT_PREREQ([2.2])
49 LT_INIT([disable-static])
50
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])
54 fi
55 AM_CONDITIONAL(HAVE_DRM, test "x$have_drm" = "xyes")
56
57 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
58
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])
62 fi
63 AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes])
64
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])
68 fi
69 AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
70
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])
74 fi
75 AM_CONDITIONAL(HAVE_GLIB, [test "x$HAVE_GLIB" = xyes])
76
77 dnl Use lots of warning flags with GCC
78
79 WARN_CFLAGS=""
80
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"
85 fi
86
87 AC_SUBST([WARN_CFLAGS])
88
89 AC_ARG_ENABLE(shader-debugger,
90               AS_HELP_STRING([--enable-shader-debugger],
91                              [Enable shader debugging support [default=no]]),
92               [SHADER_DEBUGGER="$enableval"],
93               [SHADER_DEBUGGER=no])
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])
97 fi
98
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)
101 XORG_DEFAULT_OPTIONS
102
103 AC_CONFIG_FILES([
104         Makefile
105         benchmarks/Makefile
106         lib/Makefile
107         man/Makefile
108         scripts/Makefile
109         tests/Makefile
110         tools/Makefile
111         debugger/Makefile
112 ])
113 AC_OUTPUT