blob: 16d315e13ad41cbf7e8b415431c9da4320617e76 [file] [log] [blame]
Dan Nicholsondca1b792007-10-23 09:25:58 -07001dnl Process this file with autoconf to create configure.
2
Dan Nicholson297e16c2008-05-05 15:42:53 -07003AC_PREREQ([2.59])
Dan Nicholsondca1b792007-10-23 09:25:58 -07004
Dan Nicholson00994ac2008-04-30 15:06:00 -07005dnl Versioning - scrape the version from configs/default
6m4_define([mesa_version],
7 [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n'])])
Dan Nicholson356f3112009-04-29 06:49:27 -07008m4_ifval(mesa_version,,
9 [m4_fatal([Failed to get the Mesa version from `make -f bin/version.mk version`])])
Dan Nicholsondca1b792007-10-23 09:25:58 -070010
Dan Nicholsone97ab722008-07-01 08:55:42 -070011dnl Tell the user about autoconf.html in the --help output
12m4_divert_once([HELP_END], [
13See docs/autoconf.html for more details on the options for Mesa.])
14
Dan Nicholson00994ac2008-04-30 15:06:00 -070015AC_INIT([Mesa],[mesa_version],
Dan Nicholsonf64d6fe2007-12-12 17:57:45 -080016 [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
Dan Nicholson297e16c2008-05-05 15:42:53 -070017AC_CONFIG_AUX_DIR([bin])
Dan Nicholsondca1b792007-10-23 09:25:58 -070018AC_CANONICAL_HOST
19
Dan Nicholsoncc77e8f2008-05-05 14:38:22 -070020dnl Versions for external dependencies
Eric Anholt859828c2009-10-08 17:18:12 -070021LIBDRM_REQUIRED=2.4.15
Fabio Pedrettiae1c0a02009-12-22 10:43:35 +100022LIBDRM_RADEON_REQUIRED=2.4.17
Jesse Barnesa35f6bb2009-07-17 03:30:29 -040023DRI2PROTO_REQUIRED=2.2
Jesse Barnesf2f83d92010-01-11 17:28:10 -050024GLPROTO_REQUIRED=1.4.11
Dan Nicholsoncc77e8f2008-05-05 14:38:22 -070025
Dan Nicholsondca1b792007-10-23 09:25:58 -070026dnl Check for progs
27AC_PROG_CPP
28AC_PROG_CC
29AC_PROG_CXX
Dan Nicholson297e16c2008-05-05 15:42:53 -070030AC_CHECK_PROGS([MAKE], [gmake make])
31AC_PATH_PROG([MKDEP], [makedepend])
32AC_PATH_PROG([SED], [sed])
Dan Nicholson41b00702007-12-12 08:48:30 -080033
Dan Nicholsonbc302b22009-05-22 09:39:02 -070034dnl Our fallback install-sh is a symlink to minstall. Use the existing
35dnl configuration in that case.
36AC_PROG_INSTALL
37test "x$INSTALL" = "x$ac_install_sh" && INSTALL='$(MINSTALL)'
38
Dan Nicholsonbfb27b52008-06-30 09:40:30 -070039dnl We need a POSIX shell for parts of the build. Assume we have one
40dnl in most cases.
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -070041case "$host_os" in
42solaris*)
43 # Solaris /bin/sh is too old/non-POSIX compliant
44 AC_PATH_PROGS(POSIX_SHELL, [ksh93 ksh sh])
Dan Nicholsonbfb27b52008-06-30 09:40:30 -070045 SHELL="$POSIX_SHELL"
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -070046 ;;
47esac
48
Dan Nicholsondb7fc632008-03-07 11:48:09 -080049MKDEP_OPTIONS=-fdepend
Kristian Høgsbergbcecea62008-02-25 18:50:26 -050050dnl Ask gcc where it's keeping its secret headers
51if test "x$GCC" = xyes; then
Dan Nicholsona3d223f2009-01-30 10:52:09 -080052 for dir in include include-fixed; do
53 GCC_INCLUDES=`$CC -print-file-name=$dir`
54 if test "x$GCC_INCLUDES" != x && \
55 test "$GCC_INCLUDES" != "$dir" && \
56 test -d "$GCC_INCLUDES"; then
57 MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
58 fi
59 done
Kristian Høgsbergbcecea62008-02-25 18:50:26 -050060fi
Dan Nicholson297e16c2008-05-05 15:42:53 -070061AC_SUBST([MKDEP_OPTIONS])
Kristian Høgsbergbcecea62008-02-25 18:50:26 -050062
Dan Nicholson41b00702007-12-12 08:48:30 -080063dnl Make sure the pkg-config macros are defined
Dan Nicholson356f3112009-04-29 06:49:27 -070064m4_ifndef([PKG_PROG_PKG_CONFIG],
65 [m4_fatal([Could not locate the pkg-config autoconf macros.
66 These are usually located in /usr/share/aclocal/pkg.m4. If your macros
67 are in a different location, try setting the environment variable
68 ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])])
Dan Nicholsondca1b792007-10-23 09:25:58 -070069PKG_PROG_PKG_CONFIG()
70
71dnl LIB_DIR - library basename
72LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
Dan Nicholson297e16c2008-05-05 15:42:53 -070073AC_SUBST([LIB_DIR])
Dan Nicholsondca1b792007-10-23 09:25:58 -070074
75dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later
76_SAVE_LDFLAGS="$LDFLAGS"
Dan Nicholson297e16c2008-05-05 15:42:53 -070077AC_ARG_VAR([EXTRA_LIB_PATH],[Extra -L paths for the linker])
78AC_SUBST([EXTRA_LIB_PATH])
Dan Nicholsondca1b792007-10-23 09:25:58 -070079
80dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later
81_SAVE_CPPFLAGS="$CPPFLAGS"
Dan Nicholson297e16c2008-05-05 15:42:53 -070082AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11 headers])
83AC_SUBST([X11_INCLUDES])
Dan Nicholsondca1b792007-10-23 09:25:58 -070084
85dnl Compiler macros
86DEFINES=""
Dan Nicholson297e16c2008-05-05 15:42:53 -070087AC_SUBST([DEFINES])
Dan Nicholsondca1b792007-10-23 09:25:58 -070088case "$host_os" in
Samuel Thibaultd18dd6a2009-04-23 05:43:22 -070089linux*|*-gnu*|gnu*)
Dan Nicholson29f603a2009-01-12 11:10:31 -080090 DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
Dan Nicholsondca1b792007-10-23 09:25:58 -070091 ;;
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -070092solaris*)
93 DEFINES="$DEFINES -DPTHREADS -DSVR4"
94 ;;
Dan Nicholsondca1b792007-10-23 09:25:58 -070095esac
96
97dnl Add flags for gcc and g++
98if test "x$GCC" = xyes; then
Alan Coopersmithadda7f32010-01-16 18:34:23 -080099 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
100
101 # Enable -fvisibility=hidden if using a gcc that supports it
102 save_CFLAGS="$CFLAGS"
Alan Coopersmithf8107a42010-01-21 16:42:58 -0800103 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
Alan Coopersmithadda7f32010-01-16 18:34:23 -0800104 CFLAGS="$CFLAGS -fvisibility=hidden"
105 AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
106 [CFLAGS="$save_CFLAGS" ; AC_MSG_RESULT([no])]);
Dan Nicholson0c275b62008-01-15 22:52:25 -0800107
108 # Work around aliasing bugs - developers should comment this out
109 CFLAGS="$CFLAGS -fno-strict-aliasing"
Dan Nicholsondca1b792007-10-23 09:25:58 -0700110fi
111if test "x$GXX" = xyes; then
112 CXXFLAGS="$CXXFLAGS -Wall"
Dan Nicholson0c275b62008-01-15 22:52:25 -0800113
114 # Work around aliasing bugs - developers should comment this out
115 CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
Dan Nicholsondca1b792007-10-23 09:25:58 -0700116fi
117
118dnl These should be unnecessary, but let the user set them if they want
Dan Nicholson297e16c2008-05-05 15:42:53 -0700119AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler.
Dan Nicholsondca1b792007-10-23 09:25:58 -0700120 Default is to use CFLAGS.])
Dan Nicholson297e16c2008-05-05 15:42:53 -0700121AC_ARG_VAR([ARCH_FLAGS], [Additional architecture specific flags for the
Dan Nicholsondca1b792007-10-23 09:25:58 -0700122 compiler. Default is to use CFLAGS.])
Dan Nicholson297e16c2008-05-05 15:42:53 -0700123AC_SUBST([OPT_FLAGS])
124AC_SUBST([ARCH_FLAGS])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700125
126dnl
Dan Nicholsonab57cba2007-12-26 11:12:29 -0600127dnl Hacks to enable 32 or 64 bit build
128dnl
Dan Nicholson297e16c2008-05-05 15:42:53 -0700129AC_ARG_ENABLE([32-bit],
Dan Nicholsonab57cba2007-12-26 11:12:29 -0600130 [AS_HELP_STRING([--enable-32-bit],
131 [build 32-bit libraries @<:@default=auto@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700132 [enable_32bit="$enableval"],
133 [enable_32bit=auto]
Dan Nicholsonab57cba2007-12-26 11:12:29 -0600134)
135if test "x$enable_32bit" = xyes; then
136 if test "x$GCC" = xyes; then
137 CFLAGS="$CFLAGS -m32"
Marc Dietrichc705e722009-08-31 08:56:33 -0700138 ARCH_FLAGS="$ARCH_FLAGS -m32"
Dan Nicholsonab57cba2007-12-26 11:12:29 -0600139 fi
140 if test "x$GXX" = xyes; then
141 CXXFLAGS="$CXXFLAGS -m32"
142 fi
143fi
Dan Nicholson297e16c2008-05-05 15:42:53 -0700144AC_ARG_ENABLE([64-bit],
Dan Nicholsonab57cba2007-12-26 11:12:29 -0600145 [AS_HELP_STRING([--enable-64-bit],
146 [build 64-bit libraries @<:@default=auto@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700147 [enable_64bit="$enableval"],
148 [enable_64bit=auto]
Dan Nicholsonab57cba2007-12-26 11:12:29 -0600149)
150if test "x$enable_64bit" = xyes; then
151 if test "x$GCC" = xyes; then
152 CFLAGS="$CFLAGS -m64"
153 fi
154 if test "x$GXX" = xyes; then
155 CXXFLAGS="$CXXFLAGS -m64"
156 fi
157fi
158
159dnl
Dan Nicholson88586332007-11-15 08:59:57 -0800160dnl shared/static libraries, mimic libtool options
161dnl
Dan Nicholson297e16c2008-05-05 15:42:53 -0700162AC_ARG_ENABLE([static],
Dan Nicholson88586332007-11-15 08:59:57 -0800163 [AS_HELP_STRING([--enable-static],
Dan Nicholson79ad4582007-12-07 19:11:01 -0800164 [build static libraries @<:@default=disabled@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700165 [enable_static="$enableval"],
166 [enable_static=no]
Dan Nicholson88586332007-11-15 08:59:57 -0800167)
168case "x$enable_static" in
169xyes|xno ) ;;
170x ) enable_static=no ;;
171* )
172 AC_MSG_ERROR([Static library option '$enable_static' is not a valid])
173 ;;
174esac
Dan Nicholson297e16c2008-05-05 15:42:53 -0700175AC_ARG_ENABLE([shared],
Dan Nicholson88586332007-11-15 08:59:57 -0800176 [AS_HELP_STRING([--disable-shared],
Dan Nicholson79ad4582007-12-07 19:11:01 -0800177 [build shared libraries @<:@default=enabled@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700178 [enable_shared="$enableval"],
179 [enable_shared=yes]
Dan Nicholson88586332007-11-15 08:59:57 -0800180)
181case "x$enable_shared" in
182xyes|xno ) ;;
183x ) enable_shared=yes ;;
184* )
185 AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid])
186 ;;
187esac
188
189dnl Can't have static and shared libraries, default to static if user
190dnl explicitly requested. If both disabled, set to static since shared
191dnl was explicitly requirested.
192case "x$enable_static$enable_shared" in
193xyesyes )
194 AC_MSG_WARN([Can't build static and shared libraries, disabling shared])
195 enable_shared=no
196 ;;
197xnono )
198 AC_MSG_WARN([Can't disable both static and shared libraries, enabling static])
199 enable_static=yes
200 ;;
201esac
202
203dnl
204dnl mklib options
205dnl
Dan Nicholson297e16c2008-05-05 15:42:53 -0700206AC_ARG_VAR([MKLIB_OPTIONS],[Options for the Mesa library script, mklib])
Dan Nicholson88586332007-11-15 08:59:57 -0800207if test "$enable_static" = yes; then
208 MKLIB_OPTIONS="$MKLIB_OPTIONS -static"
209fi
Dan Nicholson297e16c2008-05-05 15:42:53 -0700210AC_SUBST([MKLIB_OPTIONS])
Dan Nicholson88586332007-11-15 08:59:57 -0800211
Dan Nicholson23656c42007-12-12 09:02:31 -0800212dnl
213dnl other compiler options
214dnl
Dan Nicholson297e16c2008-05-05 15:42:53 -0700215AC_ARG_ENABLE([debug],
Dan Nicholson23656c42007-12-12 09:02:31 -0800216 [AS_HELP_STRING([--enable-debug],
217 [use debug compiler flags and macros @<:@default=disabled@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700218 [enable_debug="$enableval"],
219 [enable_debug=no]
Dan Nicholson23656c42007-12-12 09:02:31 -0800220)
221if test "x$enable_debug" = xyes; then
222 DEFINES="$DEFINES -DDEBUG"
223 if test "x$GCC" = xyes; then
224 CFLAGS="$CFLAGS -g"
225 fi
226 if test "x$GXX" = xyes; then
227 CXXFLAGS="$CXXFLAGS -g"
228 fi
229fi
Dan Nicholson88586332007-11-15 08:59:57 -0800230
231dnl
Dan Nicholsondca1b792007-10-23 09:25:58 -0700232dnl library names
233dnl
Dan Nicholson88586332007-11-15 08:59:57 -0800234if test "$enable_static" = yes; then
Dan Nicholson8217f242009-02-11 15:16:00 -0800235 LIB_EXTENSION='a'
Dan Nicholson88586332007-11-15 08:59:57 -0800236else
Siddhartha Chaudhuri1a46c8a2009-02-09 07:58:38 -0700237 case "$host_os" in
238 darwin* )
239 LIB_EXTENSION='dylib' ;;
Jon TURNEY7eed6ab2009-06-08 16:02:18 +0100240 cygwin* )
241 LIB_EXTENSION='dll' ;;
Tom Fogal9282edf2009-10-13 10:55:33 -0700242 aix* )
243 LIB_EXTENSION='a' ;;
Siddhartha Chaudhuri1a46c8a2009-02-09 07:58:38 -0700244 * )
245 LIB_EXTENSION='so' ;;
246 esac
Dan Nicholson88586332007-11-15 08:59:57 -0800247fi
Dan Nicholson8217f242009-02-11 15:16:00 -0800248
249GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION}
250GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
251GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
252GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION}
253OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
Chia-I Wud4c1ee02009-12-21 11:13:18 +0800254EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
Dan Nicholson8217f242009-02-11 15:16:00 -0800255
256GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*'
257GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*'
258GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*'
259GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*'
260OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*'
Chia-I Wud4c1ee02009-12-21 11:13:18 +0800261EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*'
Dan Nicholson8217f242009-02-11 15:16:00 -0800262
Dan Nicholson297e16c2008-05-05 15:42:53 -0700263AC_SUBST([GL_LIB_NAME])
264AC_SUBST([GLU_LIB_NAME])
265AC_SUBST([GLUT_LIB_NAME])
266AC_SUBST([GLW_LIB_NAME])
267AC_SUBST([OSMESA_LIB_NAME])
Chia-I Wud4c1ee02009-12-21 11:13:18 +0800268AC_SUBST([EGL_LIB_NAME])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700269
Siddhartha Chaudhuri1a46c8a2009-02-09 07:58:38 -0700270AC_SUBST([GL_LIB_GLOB])
271AC_SUBST([GLU_LIB_GLOB])
272AC_SUBST([GLUT_LIB_GLOB])
273AC_SUBST([GLW_LIB_GLOB])
274AC_SUBST([OSMESA_LIB_GLOB])
Chia-I Wud4c1ee02009-12-21 11:13:18 +0800275AC_SUBST([EGL_LIB_GLOB])
Siddhartha Chaudhuri1a46c8a2009-02-09 07:58:38 -0700276
Dan Nicholsondca1b792007-10-23 09:25:58 -0700277dnl
Dan Nicholson871125a2008-06-04 13:00:35 -0700278dnl Arch/platform-specific settings
279dnl
280AC_ARG_ENABLE([asm],
281 [AS_HELP_STRING([--disable-asm],
282 [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
283 [enable_asm="$enableval"],
284 [enable_asm=yes]
285)
286asm_arch=""
287ASM_FLAGS=""
Dan Nicholsonc5bae142009-02-11 11:04:29 -0800288MESA_ASM_SOURCES=""
289GLAPI_ASM_SOURCES=""
Dan Nicholson871125a2008-06-04 13:00:35 -0700290AC_MSG_CHECKING([whether to enable assembly])
291test "x$enable_asm" = xno && AC_MSG_RESULT([no])
292# disable if cross compiling on x86/x86_64 since we must run gen_matypes
293if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
294 case "$host_cpu" in
295 i?86 | x86_64)
296 enable_asm=no
297 AC_MSG_RESULT([no, cross compiling])
298 ;;
299 esac
300fi
301# check for supported arches
302if test "x$enable_asm" = xyes; then
303 case "$host_cpu" in
304 i?86)
305 case "$host_os" in
Julien Cristau98fcdf32008-10-28 18:56:05 +0100306 linux* | *freebsd* | dragonfly*)
Dan Nicholson871125a2008-06-04 13:00:35 -0700307 test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
308 ;;
309 esac
310 ;;
311 x86_64)
312 case "$host_os" in
Julien Cristau98fcdf32008-10-28 18:56:05 +0100313 linux* | *freebsd* | dragonfly*)
Dan Nicholson871125a2008-06-04 13:00:35 -0700314 test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
315 ;;
316 esac
317 ;;
318 powerpc)
319 case "$host_os" in
320 linux*)
321 asm_arch=ppc
322 ;;
323 esac
324 ;;
David S. Miller857ac1e2009-02-26 05:35:15 -0800325 sparc*)
326 case "$host_os" in
327 linux*)
328 asm_arch=sparc
329 ;;
330 esac
331 ;;
Dan Nicholson871125a2008-06-04 13:00:35 -0700332 esac
333
334 case "$asm_arch" in
335 x86)
Dan Nicholson61e925f2009-02-11 10:42:34 -0800336 ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
Dan Nicholsonc5bae142009-02-11 11:04:29 -0800337 MESA_ASM_SOURCES='$(X86_SOURCES)'
338 GLAPI_ASM_SOURCES='$(X86_API)'
Dan Nicholson871125a2008-06-04 13:00:35 -0700339 AC_MSG_RESULT([yes, x86])
340 ;;
341 x86_64)
342 ASM_FLAGS="-DUSE_X86_64_ASM"
Dan Nicholsonc5bae142009-02-11 11:04:29 -0800343 MESA_ASM_SOURCES='$(X86-64_SOURCES)'
344 GLAPI_ASM_SOURCES='$(X86-64_API)'
Dan Nicholson871125a2008-06-04 13:00:35 -0700345 AC_MSG_RESULT([yes, x86_64])
346 ;;
347 ppc)
348 ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
Dan Nicholsonc5bae142009-02-11 11:04:29 -0800349 MESA_ASM_SOURCES='$(PPC_SOURCES)'
Dan Nicholson871125a2008-06-04 13:00:35 -0700350 AC_MSG_RESULT([yes, ppc])
351 ;;
David S. Miller857ac1e2009-02-26 05:35:15 -0800352 sparc)
353 ASM_FLAGS="-DUSE_SPARC_ASM"
354 MESA_ASM_SOURCES='$(SPARC_SOURCES)'
355 GLAPI_ASM_SOURCES='$(SPARC_API)'
356 AC_MSG_RESULT([yes, sparc])
357 ;;
Dan Nicholson871125a2008-06-04 13:00:35 -0700358 *)
359 AC_MSG_RESULT([no, platform not supported])
360 ;;
361 esac
362fi
363AC_SUBST([ASM_FLAGS])
Dan Nicholsonc5bae142009-02-11 11:04:29 -0800364AC_SUBST([MESA_ASM_SOURCES])
365AC_SUBST([GLAPI_ASM_SOURCES])
Dan Nicholson871125a2008-06-04 13:00:35 -0700366
367dnl PIC code macro
368MESA_PIC_FLAGS
369
370dnl Check to see if dlopen is in default libraries (like Solaris, which
371dnl has it in libc), or if libdl is needed to get it.
372AC_CHECK_FUNC([dlopen], [],
373 [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
374
Dan Nicholson985e1cd2008-06-04 13:17:06 -0700375dnl See if posix_memalign is available
376AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
377
Dan Nicholson871125a2008-06-04 13:00:35 -0700378dnl SELinux awareness.
379AC_ARG_ENABLE([selinux],
380 [AS_HELP_STRING([--enable-selinux],
381 [Build SELinux-aware Mesa @<:@default=disabled@:>@])],
382 [MESA_SELINUX="$enableval"],
383 [MESA_SELINUX=no])
384if test "x$enable_selinux" = "xyes"; then
385 AC_CHECK_HEADER([selinux/selinux.h],[],
386 [AC_MSG_ERROR([SELinux headers not found])])
387 AC_CHECK_LIB([selinux],[is_selinux_enabled],[],
388 [AC_MSG_ERROR([SELinux library not found])])
389 SELINUX_LIBS="-lselinux"
390 DEFINES="$DEFINES -DMESA_SELINUX"
391fi
392
Dan Nicholson871125a2008-06-04 13:00:35 -0700393dnl
Dan Nicholsona1307182007-12-12 17:49:49 -0800394dnl Driver configuration. Options are xlib, dri and osmesa right now.
Dan Nicholson979ff512007-12-05 18:47:01 -0800395dnl More later: directfb, fbdev, ...
Dan Nicholson44d99142007-12-05 18:47:01 -0800396dnl
Eric Anholt711222b2008-04-18 15:03:01 -0700397default_driver="xlib"
398
399case "$host_os" in
400linux*)
401 case "$host_cpu" in
David S. Miller32dc28a2009-02-24 20:06:05 -0700402 i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
Eric Anholt711222b2008-04-18 15:03:01 -0700403 esac
404 ;;
Julien Cristau98fcdf32008-10-28 18:56:05 +0100405*freebsd* | dragonfly*)
Eric Anholt711222b2008-04-18 15:03:01 -0700406 case "$host_cpu" in
Robert Noland48f05432009-04-10 11:41:27 -0500407 i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
Eric Anholt711222b2008-04-18 15:03:01 -0700408 esac
409 ;;
410esac
411
Dan Nicholson297e16c2008-05-05 15:42:53 -0700412AC_ARG_WITH([driver],
Dan Nicholson44d99142007-12-05 18:47:01 -0800413 [AS_HELP_STRING([--with-driver=DRIVER],
Eric Anholt711222b2008-04-18 15:03:01 -0700414 [driver for Mesa: xlib,dri,osmesa @<:@default=dri when available, or xlib@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700415 [mesa_driver="$withval"],
416 [mesa_driver="$default_driver"])
Dan Nicholson44d99142007-12-05 18:47:01 -0800417dnl Check for valid option
418case "x$mesa_driver" in
Dan Nicholsona1307182007-12-12 17:49:49 -0800419xxlib|xdri|xosmesa)
Dan Nicholson44d99142007-12-05 18:47:01 -0800420 ;;
421*)
422 AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option])
423 ;;
424esac
425
426dnl
427dnl Driver specific build directories
Dan Nicholsondca1b792007-10-23 09:25:58 -0700428dnl
Chia-I Wu99a37ed2010-01-05 17:39:05 +0800429
430dnl this variable will be prepended to SRC_DIRS and is not exported
431CORE_DIRS="glsl mesa"
432
433SRC_DIRS="glew"
Dan Nicholsondca1b792007-10-23 09:25:58 -0700434GLU_DIRS="sgi"
Dan Nicholson44d99142007-12-05 18:47:01 -0800435WINDOW_SYSTEM=""
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +0100436GALLIUM_DIRS="auxiliary drivers state_trackers"
Jerome Glisse14f79d42008-12-18 13:36:07 +0100437GALLIUM_WINSYS_DIRS=""
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +0100438GALLIUM_WINSYS_DRM_DIRS=""
Jakob Bornecrantzd60b2c62009-06-24 02:42:41 +0200439GALLIUM_DRIVERS_DIRS="softpipe failover trace identity"
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +0100440GALLIUM_STATE_TRACKERS_DIRS=""
441
Dan Nicholson44d99142007-12-05 18:47:01 -0800442case "$mesa_driver" in
Dan Nicholsona1307182007-12-12 17:49:49 -0800443xlib)
Dan Nicholson44d99142007-12-05 18:47:01 -0800444 DRIVER_DIRS="x11"
Jakob Bornecrantz373e6712009-04-18 23:13:56 +0100445 GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS xlib"
Dan Nicholson44d99142007-12-05 18:47:01 -0800446 ;;
447dri)
Chia-I Wu14693172010-01-21 17:58:28 +0800448 SRC_DIRS="$SRC_DIRS glx/x11"
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +0100449 DRIVER_DIRS="dri"
Dan Nicholson44d99142007-12-05 18:47:01 -0800450 WINDOW_SYSTEM="dri"
Jakob Bornecrantz373e6712009-04-18 23:13:56 +0100451 GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm"
Dan Nicholson44d99142007-12-05 18:47:01 -0800452 ;;
Dan Nicholson979ff512007-12-05 18:47:01 -0800453osmesa)
454 DRIVER_DIRS="osmesa"
455 ;;
Dan Nicholson44d99142007-12-05 18:47:01 -0800456esac
Dan Nicholson297e16c2008-05-05 15:42:53 -0700457AC_SUBST([SRC_DIRS])
458AC_SUBST([GLU_DIRS])
459AC_SUBST([DRIVER_DIRS])
460AC_SUBST([WINDOW_SYSTEM])
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +0100461AC_SUBST([GALLIUM_DIRS])
Jerome Glisse14f79d42008-12-18 13:36:07 +0100462AC_SUBST([GALLIUM_WINSYS_DIRS])
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +0100463AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
Jakob Bornecrantzd67bd602009-02-20 11:03:18 +0000464AC_SUBST([GALLIUM_DRIVERS_DIRS])
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +0100465AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700466
467dnl
Dan Nicholson8e4d1472007-11-15 08:59:57 -0800468dnl User supplied program configuration
469dnl
470if test -d "$srcdir/progs/demos"; then
471 default_demos=yes
472else
473 default_demos=no
474fi
Dan Nicholson297e16c2008-05-05 15:42:53 -0700475AC_ARG_WITH([demos],
Dan Nicholson8e4d1472007-11-15 08:59:57 -0800476 [AS_HELP_STRING([--with-demos@<:@=DIRS...@:>@],
477 [optional comma delimited demo directories to build
Dan Nicholsonc79c93c2007-12-12 18:13:04 -0800478 @<:@default=auto if source available@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700479 [with_demos="$withval"],
480 [with_demos="$default_demos"])
Dan Nicholson8e4d1472007-11-15 08:59:57 -0800481if test "x$with_demos" = x; then
482 with_demos=no
483fi
484
485dnl If $with_demos is yes, directories will be added as libs available
486PROGRAM_DIRS=""
487case "$with_demos" in
Dan Nicholsonb9576552008-03-10 14:05:46 -0700488no) ;;
489yes)
490 # If the driver isn't osmesa, we have libGL and can build xdemos
491 if test "$mesa_driver" != osmesa; then
492 PROGRAM_DIRS="xdemos"
493 fi
494 ;;
Dan Nicholson8e4d1472007-11-15 08:59:57 -0800495*)
496 # verify the requested demos directories exist
497 demos=`IFS=,; echo $with_demos`
498 for demo in $demos; do
499 test -d "$srcdir/progs/$demo" || \
500 AC_MSG_ERROR([Program directory '$demo' doesn't exist])
501 done
502 PROGRAM_DIRS="$demos"
503 ;;
504esac
505
506dnl
Dan Nicholsone6a06092008-05-05 15:16:22 -0700507dnl Find out if X is available. The variable have_x is set if libX11 is
Dan Nicholson99803a42008-07-01 09:03:15 -0700508dnl found to mimic AC_PATH_XTRA.
Dan Nicholsondca1b792007-10-23 09:25:58 -0700509dnl
510if test -n "$PKG_CONFIG"; then
511 AC_MSG_CHECKING([pkg-config files for X11 are available])
Dan Nicholsone6a06092008-05-05 15:16:22 -0700512 PKG_CHECK_EXISTS([x11],[
Dan Nicholsondca1b792007-10-23 09:25:58 -0700513 x11_pkgconfig=yes
514 have_x=yes
Dan Nicholsone6a06092008-05-05 15:16:22 -0700515 ],[
Dan Nicholsondca1b792007-10-23 09:25:58 -0700516 x11_pkgconfig=no
Dan Nicholsone6a06092008-05-05 15:16:22 -0700517 ])
518 AC_MSG_RESULT([$x11_pkgconfig])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700519else
520 x11_pkgconfig=no
521fi
522dnl Use the autoconf macro if no pkg-config files
523if test "$x11_pkgconfig" = no; then
524 AC_PATH_XTRA
525fi
526
Dan Nicholson99803a42008-07-01 09:03:15 -0700527dnl Try to tell the user that the --x-* options are only used when
528dnl pkg-config is not available. This must be right after AC_PATH_XTRA.
529m4_divert_once([HELP_BEGIN],
530[These options are only used when the X libraries cannot be found by the
531pkg-config utility.])
532
Dan Nicholson44d99142007-12-05 18:47:01 -0800533dnl We need X for xlib and dri, so bomb now if it's not found
534case "$mesa_driver" in
Dan Nicholsona1307182007-12-12 17:49:49 -0800535xlib|dri)
Dan Nicholson44d99142007-12-05 18:47:01 -0800536 if test "$no_x" = yes; then
537 AC_MSG_ERROR([X11 development libraries needed for $mesa_driver driver])
538 fi
539 ;;
540esac
Dan Nicholsondca1b792007-10-23 09:25:58 -0700541
Dan Nicholson2d709fe2008-05-06 10:51:49 -0700542dnl XCB - this is only used for GLX right now
543AC_ARG_ENABLE([xcb],
544 [AS_HELP_STRING([--enable-xcb],
545 [use XCB for GLX @<:@default=disabled@:>@])],
546 [enable_xcb="$enableval"],
547 [enable_xcb=no])
548if test "x$enable_xcb" = xyes; then
549 DEFINES="$DEFINES -DUSE_XCB"
550else
551 enable_xcb=no
552fi
553
Dan Nicholson44d99142007-12-05 18:47:01 -0800554dnl
555dnl libGL configuration per driver
556dnl
557case "$mesa_driver" in
Dan Nicholsona1307182007-12-12 17:49:49 -0800558xlib)
Dan Nicholson44d99142007-12-05 18:47:01 -0800559 if test "$x11_pkgconfig" = yes; then
Dan Nicholson297e16c2008-05-05 15:42:53 -0700560 PKG_CHECK_MODULES([XLIBGL], [x11 xext])
Dan Nicholson71e208b2008-11-24 11:01:57 -0800561 GL_PC_REQ_PRIV="x11 xext"
Dan Nicholsona1307182007-12-12 17:49:49 -0800562 X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
563 GL_LIB_DEPS="$XLIBGL_LIBS"
Dan Nicholson44d99142007-12-05 18:47:01 -0800564 else
565 # should check these...
566 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
567 GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
Dan Nicholson71e208b2008-11-24 11:01:57 -0800568 GL_PC_LIB_PRIV="$GL_LIB_DEPS"
569 GL_PC_CFLAGS="$X11_INCLUDES"
Dan Nicholson44d99142007-12-05 18:47:01 -0800570 fi
Alan Coopersmith3cf6e622009-03-23 16:51:54 -0700571 GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
572 GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
Dan Nicholson88586332007-11-15 08:59:57 -0800573
574 # if static, move the external libraries to the programs
575 # and empty the libraries for libGL
576 if test "$enable_static" = yes; then
577 APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS"
578 GL_LIB_DEPS=""
579 fi
Dan Nicholson44d99142007-12-05 18:47:01 -0800580 ;;
581dri)
Dan Nicholson88586332007-11-15 08:59:57 -0800582 # DRI must be shared, I think
583 if test "$enable_static" = yes; then
584 AC_MSG_ERROR([Can't use static libraries for DRI drivers])
585 fi
586
Dan Nicholson44d99142007-12-05 18:47:01 -0800587 # Check for libdrm
Dan Nicholsoncc77e8f2008-05-05 14:38:22 -0700588 PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
589 PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
Jesse Barnesf2f83d92010-01-11 17:28:10 -0500590 PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
Jesse Barnesed59b132010-01-13 15:48:14 -0500591 GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED"
592 DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
Dan Nicholson44d99142007-12-05 18:47:01 -0800593
594 # find the DRI deps for libGL
595 if test "$x11_pkgconfig" = yes; then
Dan Nicholson2d709fe2008-05-06 10:51:49 -0700596 # add xcb modules if necessary
597 dri_modules="x11 xext xxf86vm xdamage xfixes"
598 if test "$enable_xcb" = yes; then
599 dri_modules="$dri_modules x11-xcb xcb-glx"
600 fi
601
602 PKG_CHECK_MODULES([DRIGL], [$dri_modules])
Dan Nicholson71e208b2008-11-24 11:01:57 -0800603 GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
Dan Nicholson44d99142007-12-05 18:47:01 -0800604 X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
605 GL_LIB_DEPS="$DRIGL_LIBS"
606 else
607 # should check these...
608 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
609 GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
Dan Nicholson71e208b2008-11-24 11:01:57 -0800610 GL_PC_LIB_PRIV="$GL_LIB_DEPS"
611 GL_PC_CFLAGS="$X11_INCLUDES"
Dan Nicholson2d709fe2008-05-06 10:51:49 -0700612
613 # XCB can only be used from pkg-config
614 if test "$enable_xcb" = yes; then
615 PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx])
Dan Nicholson71e208b2008-11-24 11:01:57 -0800616 GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx"
Dan Nicholson2d709fe2008-05-06 10:51:49 -0700617 X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS"
618 GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS"
619 fi
Dan Nicholson44d99142007-12-05 18:47:01 -0800620 fi
621
622 # need DRM libs, -lpthread, etc.
Alan Coopersmith3cf6e622009-03-23 16:51:54 -0700623 GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
624 GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
Dan Nicholson44d99142007-12-05 18:47:01 -0800625 ;;
Dan Nicholson979ff512007-12-05 18:47:01 -0800626osmesa)
627 # No libGL for osmesa
Alan Coopersmith3cf6e622009-03-23 16:51:54 -0700628 GL_LIB_DEPS=""
Dan Nicholson979ff512007-12-05 18:47:01 -0800629 ;;
Dan Nicholson44d99142007-12-05 18:47:01 -0800630esac
Dan Nicholson297e16c2008-05-05 15:42:53 -0700631AC_SUBST([GL_LIB_DEPS])
Dan Nicholson71e208b2008-11-24 11:01:57 -0800632AC_SUBST([GL_PC_REQ_PRIV])
633AC_SUBST([GL_PC_LIB_PRIV])
634AC_SUBST([GL_PC_CFLAGS])
635AC_SUBST([DRI_PC_REQ_PRIV])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700636
637dnl
638dnl More X11 setup
639dnl
Dan Nicholsona1307182007-12-12 17:49:49 -0800640if test "$mesa_driver" = xlib; then
Dan Nicholsondca1b792007-10-23 09:25:58 -0700641 DEFINES="$DEFINES -DUSE_XSHM"
642fi
643
644dnl
Dan Nicholson44d99142007-12-05 18:47:01 -0800645dnl More DRI setup
646dnl
Dan Nicholson297e16c2008-05-05 15:42:53 -0700647AC_ARG_ENABLE([glx-tls],
Dan Nicholson44d99142007-12-05 18:47:01 -0800648 [AS_HELP_STRING([--enable-glx-tls],
Dan Nicholson79ad4582007-12-07 19:11:01 -0800649 [enable TLS support in GLX @<:@default=disabled@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700650 [GLX_USE_TLS="$enableval"],
651 [GLX_USE_TLS=no])
Dan Nicholson44d99142007-12-05 18:47:01 -0800652dnl Directory for DRI drivers
Dan Nicholson297e16c2008-05-05 15:42:53 -0700653AC_ARG_WITH([dri-driverdir],
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800654 [AS_HELP_STRING([--with-dri-driverdir=DIR],
Dan Nicholson5dbbde52008-05-06 06:21:41 -0700655 [directory for the DRI drivers @<:@${libdir}/dri@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700656 [DRI_DRIVER_INSTALL_DIR="$withval"],
Dan Nicholson5dbbde52008-05-06 06:21:41 -0700657 [DRI_DRIVER_INSTALL_DIR='${libdir}/dri'])
Dan Nicholson297e16c2008-05-05 15:42:53 -0700658AC_SUBST([DRI_DRIVER_INSTALL_DIR])
Chow Loong Jin35506de2009-10-28 14:34:14 +0800659dnl Extra search path for DRI drivers
660AC_ARG_WITH([dri-searchpath],
661 [AS_HELP_STRING([--with-dri-searchpath=DIRS...],
662 [semicolon delimited DRI driver search directories @<:@${libdir}/dri@:>@])],
663 [DRI_DRIVER_SEARCH_DIR="$withval"],
664 [DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}'])
665AC_SUBST([DRI_DRIVER_SEARCH_DIR])
Dan Nicholson44d99142007-12-05 18:47:01 -0800666dnl Direct rendering or just indirect rendering
Dan Nicholson297e16c2008-05-05 15:42:53 -0700667AC_ARG_ENABLE([driglx-direct],
Dan Nicholson79ad4582007-12-07 19:11:01 -0800668 [AS_HELP_STRING([--disable-driglx-direct],
669 [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700670 [driglx_direct="$enableval"],
671 [driglx_direct="yes"])
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800672dnl Which drivers to build - default is chosen by platform
Dan Nicholson297e16c2008-05-05 15:42:53 -0700673AC_ARG_WITH([dri-drivers],
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800674 [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
Dan Nicholson5cae1b72008-06-30 10:28:02 -0700675 [comma delimited DRI drivers list, e.g.
Michel Dänzercade0712009-07-10 14:49:46 +0200676 "swrast,i965,radeon" @<:@default=auto@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700677 [with_dri_drivers="$withval"],
678 [with_dri_drivers=yes])
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800679if test "x$with_dri_drivers" = x; then
680 with_dri_drivers=no
681fi
682
683dnl If $with_dri_drivers is yes, directories will be added through
684dnl platform checks
685DRI_DIRS=""
686case "$with_dri_drivers" in
Florent Thoumieb5095ab2008-07-28 14:44:43 +0100687no) ;;
688yes)
689 DRI_DIRS="yes"
690 ;;
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800691*)
692 # verify the requested driver directories exist
Dan Nicholsone6e4f252008-07-06 14:17:39 -0700693 dri_drivers=`IFS=', '; echo $with_dri_drivers`
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800694 for driver in $dri_drivers; do
695 test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
696 AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist])
697 done
698 DRI_DIRS="$dri_drivers"
699 ;;
700esac
701
Dan Nicholson44d99142007-12-05 18:47:01 -0800702dnl Set DRI_DIRS, DEFINES and LIB_DEPS
703if test "$mesa_driver" = dri; then
704 # Use TLS in GLX?
705 if test "x$GLX_USE_TLS" = xyes; then
706 DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
707 fi
708
Dan Nicholson44d99142007-12-05 18:47:01 -0800709 # Platform specific settings and drivers to build
710 case "$host_os" in
711 linux*)
712 DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
Dan Nicholson44d99142007-12-05 18:47:01 -0800713 if test "x$driglx_direct" = xyes; then
714 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
715 fi
Jerome Glisse14f79d42008-12-18 13:36:07 +0100716 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS"
Dan Nicholson44d99142007-12-05 18:47:01 -0800717
718 case "$host_cpu" in
Dan Nicholson44d99142007-12-05 18:47:01 -0800719 x86_64)
Dan Nicholsona76e2452007-12-07 11:25:08 -0800720 # ffb, gamma, and sis are missing because they have not be
721 # converted to use the new interface. i810 are missing
722 # because there is no x86-64 system where they could *ever*
723 # be used.
Florent Thoumieb5095ab2008-07-28 14:44:43 +0100724 if test "x$DRI_DIRS" = "xyes"; then
Alex Deucher4138bdb2009-04-08 15:16:35 -0400725 DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \
George Sapountzis280bf892008-05-11 14:43:40 +0300726 savage tdfx unichrome swrast"
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800727 fi
Dan Nicholson44d99142007-12-05 18:47:01 -0800728 ;;
729 powerpc*)
Dan Nicholsona76e2452007-12-07 11:25:08 -0800730 # Build only the drivers for cards that exist on PowerPC.
731 # At some point MGA will be added, but not yet.
Florent Thoumieb5095ab2008-07-28 14:44:43 +0100732 if test "x$DRI_DIRS" = "xyes"; then
Alex Deucher4138bdb2009-04-08 15:16:35 -0400733 DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast"
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800734 fi
Dan Nicholson44d99142007-12-05 18:47:01 -0800735 ;;
Dave Airlie2b0e75e2008-06-12 12:06:50 +1000736 sparc*)
737 # Build only the drivers for cards that exist on sparc`
Florent Thoumieb5095ab2008-07-28 14:44:43 +0100738 if test "x$DRI_DIRS" = "xyes"; then
Alex Deucher4138bdb2009-04-08 15:16:35 -0400739 DRI_DIRS="mach64 r128 r200 r300 r600 radeon ffb swrast"
Dave Airlie2b0e75e2008-06-12 12:06:50 +1000740 fi
741 ;;
Dan Nicholson44d99142007-12-05 18:47:01 -0800742 esac
743 ;;
Hasso Tepper9f8df2d2008-04-09 10:51:21 -0700744 freebsd* | dragonfly*)
Dan Nicholson44d99142007-12-05 18:47:01 -0800745 DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
746 DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
747 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
748 if test "x$driglx_direct" = xyes; then
749 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
750 fi
751 if test "x$GXX" = xyes; then
752 CXXFLAGS="$CXXFLAGS -ansi -pedantic"
753 fi
754
Dan Nicholsona76e2452007-12-07 11:25:08 -0800755 # ffb and gamma are missing because they have not been converted
756 # to use the new interface.
Florent Thoumieb5095ab2008-07-28 14:44:43 +0100757 if test "x$DRI_DIRS" = "xyes"; then
Alex Deucher4138bdb2009-04-08 15:16:35 -0400758 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
George Sapountzis280bf892008-05-11 14:43:40 +0300759 unichrome savage sis swrast"
Dan Nicholsonaf3d2f22007-11-15 08:59:57 -0800760 fi
Dan Nicholson44d99142007-12-05 18:47:01 -0800761 ;;
Samuel Thibaultd18dd6a2009-04-23 05:43:22 -0700762 gnu*)
763 DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
764 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS"
765 ;;
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -0700766 solaris*)
767 DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
768 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
769 if test "x$driglx_direct" = xyes; then
770 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
771 fi
772 ;;
Dan Nicholson44d99142007-12-05 18:47:01 -0800773 esac
Dan Nicholson112a40e2008-02-21 10:17:19 -0800774
775 # default drivers
Florent Thoumieb5095ab2008-07-28 14:44:43 +0100776 if test "x$DRI_DIRS" = "xyes"; then
Corbin Simpson8e4657a2009-10-22 12:29:30 -0700777 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \
Corbin Simpsonfd7ee2b2009-10-22 12:57:13 -0700778 savage sis tdfx unichrome ffb swrast"
Dan Nicholson112a40e2008-02-21 10:17:19 -0800779 fi
780
Dan Nicholson44d99142007-12-05 18:47:01 -0800781 DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
782
783 # Check for expat
784 EXPAT_INCLUDES=""
785 EXPAT_LIB=-lexpat
Dan Nicholson297e16c2008-05-05 15:42:53 -0700786 AC_ARG_WITH([expat],
787 [AS_HELP_STRING([--with-expat=DIR],
788 [expat install directory])],[
Dan Nicholson44d99142007-12-05 18:47:01 -0800789 EXPAT_INCLUDES="-I$withval/include"
790 CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
791 LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
792 EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
793 ])
Dan Nicholson297e16c2008-05-05 15:42:53 -0700794 AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])])
795 AC_CHECK_LIB([expat],[XML_ParserCreate],[],
796 [AC_MSG_ERROR([Expat required for DRI.])])
Dan Nicholson44d99142007-12-05 18:47:01 -0800797
798 # put all the necessary libs together
Eric Anholt050c5332008-03-20 17:28:58 -0700799 DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
Dan Nicholson44d99142007-12-05 18:47:01 -0800800fi
Dan Nicholson297e16c2008-05-05 15:42:53 -0700801AC_SUBST([DRI_DIRS])
802AC_SUBST([EXPAT_INCLUDES])
803AC_SUBST([DRI_LIB_DEPS])
Dan Nicholson44d99142007-12-05 18:47:01 -0800804
Kristian Høgsberg8616cec2010-01-01 17:03:33 -0500805case $DRI_DIRS in
806*i915*|*i965*)
807 PKG_CHECK_MODULES([INTEL], [libdrm_intel])
808 ;;
Kristian Høgsberg27fe7a72010-01-07 10:29:29 -0500809esac
Kristian Høgsberg8616cec2010-01-01 17:03:33 -0500810
Kristian Høgsberg27fe7a72010-01-07 10:29:29 -0500811case $DRI_DIRS in
Kristian Høgsberg8616cec2010-01-01 17:03:33 -0500812*radeon*|*r200*|*r300*|*r600*)
813 PKG_CHECK_MODULES([LIBDRM_RADEON],
814 [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED],
815 HAVE_LIBDRM_RADEON=yes,
816 HAVE_LIBDRM_RADEON=no)
817
818 if test "$HAVE_LIBDRM_RADEON" = yes; then
819 RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
820 RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
821 fi
822 ;;
823esac
824AC_SUBST([RADEON_CFLAGS])
825AC_SUBST([RADEON_LDFLAGS])
826
827
Dan Nicholson44d99142007-12-05 18:47:01 -0800828dnl
Dan Nicholsondca1b792007-10-23 09:25:58 -0700829dnl OSMesa configuration
830dnl
Dan Nicholsona1307182007-12-12 17:49:49 -0800831if test "$mesa_driver" = xlib; then
Dan Nicholson544ab202007-12-30 08:41:53 -0800832 default_gl_osmesa=yes
Dan Nicholson979ff512007-12-05 18:47:01 -0800833else
Dan Nicholson544ab202007-12-30 08:41:53 -0800834 default_gl_osmesa=no
Dan Nicholson44d99142007-12-05 18:47:01 -0800835fi
Dan Nicholson297e16c2008-05-05 15:42:53 -0700836AC_ARG_ENABLE([gl-osmesa],
Dan Nicholson544ab202007-12-30 08:41:53 -0800837 [AS_HELP_STRING([--enable-gl-osmesa],
838 [enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700839 [gl_osmesa="$enableval"],
840 [gl_osmesa="$default_gl_osmesa"])
Dan Nicholson544ab202007-12-30 08:41:53 -0800841if test "x$gl_osmesa" = xyes; then
842 if test "$mesa_driver" = osmesa; then
843 AC_MSG_ERROR([libGL is not available for OSMesa driver])
Dan Nicholson979ff512007-12-05 18:47:01 -0800844 else
Dan Nicholson544ab202007-12-30 08:41:53 -0800845 DRIVER_DIRS="$DRIVER_DIRS osmesa"
Dan Nicholson979ff512007-12-05 18:47:01 -0800846 fi
847fi
848
Dan Nicholson6689f9e2007-12-05 21:04:15 -0800849dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...)
Dan Nicholson297e16c2008-05-05 15:42:53 -0700850AC_ARG_WITH([osmesa-bits],
Dan Nicholson6689f9e2007-12-05 21:04:15 -0800851 [AS_HELP_STRING([--with-osmesa-bits=BITS],
852 [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700853 [osmesa_bits="$withval"],
854 [osmesa_bits=8])
Dan Nicholson6689f9e2007-12-05 21:04:15 -0800855if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then
856 AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver])
857 osmesa_bits=8
858fi
859case "x$osmesa_bits" in
860x8)
861 OSMESA_LIB=OSMesa
862 ;;
863x16|x32)
864 OSMESA_LIB="OSMesa$osmesa_bits"
865 DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
866 ;;
867*)
868 AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option])
869 ;;
870esac
Dan Nicholson297e16c2008-05-05 15:42:53 -0700871AC_SUBST([OSMESA_LIB])
Dan Nicholson6689f9e2007-12-05 21:04:15 -0800872
Dan Nicholson979ff512007-12-05 18:47:01 -0800873case "$mesa_driver" in
874osmesa)
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -0700875 # only link libraries with osmesa if shared
Dan Nicholson88586332007-11-15 08:59:57 -0800876 if test "$enable_static" = no; then
Dan Nicholson4795dd52009-06-04 19:42:08 -0700877 OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
Dan Nicholson88586332007-11-15 08:59:57 -0800878 else
879 OSMESA_LIB_DEPS=""
880 fi
Dan Nicholson979ff512007-12-05 18:47:01 -0800881 OSMESA_MESA_DEPS=""
Dan Nicholson4795dd52009-06-04 19:42:08 -0700882 OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
Dan Nicholson979ff512007-12-05 18:47:01 -0800883 ;;
884*)
885 # Link OSMesa to libGL otherwise
886 OSMESA_LIB_DEPS=""
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -0700887 # only link libraries with osmesa if shared
Dan Nicholson88586332007-11-15 08:59:57 -0800888 if test "$enable_static" = no; then
889 OSMESA_MESA_DEPS='-l$(GL_LIB)'
890 else
891 OSMESA_MESA_DEPS=""
892 fi
Dan Nicholson8be02fc2008-12-14 09:35:29 -0800893 OSMESA_PC_REQ="gl"
Dan Nicholson979ff512007-12-05 18:47:01 -0800894 ;;
895esac
Alan Coopersmith3cf6e622009-03-23 16:51:54 -0700896OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
Dan Nicholson297e16c2008-05-05 15:42:53 -0700897AC_SUBST([OSMESA_LIB_DEPS])
898AC_SUBST([OSMESA_MESA_DEPS])
Dan Nicholson8be02fc2008-12-14 09:35:29 -0800899AC_SUBST([OSMESA_PC_REQ])
900AC_SUBST([OSMESA_PC_LIB_PRIV])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700901
902dnl
Dan Nicholson53b37342009-02-25 17:45:34 -0800903dnl EGL configuration
904dnl
Dan Nicholson66f97862009-04-29 12:11:43 -0700905AC_ARG_ENABLE([egl],
906 [AS_HELP_STRING([--disable-egl],
907 [disable EGL library @<:@default=enabled@:>@])],
908 [enable_egl="$enableval"],
909 [enable_egl=yes])
910if test "x$enable_egl" = xyes; then
911 SRC_DIRS="$SRC_DIRS egl"
Chia-I Wud4c1ee02009-12-21 11:13:18 +0800912 EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread"
913 EGL_DRIVERS_DIRS=""
914 if test "$enable_static" != yes && test "$mesa_driver" != osmesa; then
915 # build egl_glx when libGL is built
916 EGL_DRIVERS_DIRS="glx"
Dan Nicholson66f97862009-04-29 12:11:43 -0700917 fi
Kristian Høgsberg42fa0092010-02-03 10:18:28 -0500918 if test "$mesa_driver" == dri; then
919 # build egl_dri2 when dri is enabled
920 EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS dri2"
921 fi
Dan Nicholson53b37342009-02-25 17:45:34 -0800922fi
Dan Nicholson53b37342009-02-25 17:45:34 -0800923AC_SUBST([EGL_LIB_DEPS])
Chia-I Wud4c1ee02009-12-21 11:13:18 +0800924AC_SUBST([EGL_DRIVERS_DIRS])
Dan Nicholson53b37342009-02-25 17:45:34 -0800925
926dnl
Dan Nicholsondca1b792007-10-23 09:25:58 -0700927dnl GLU configuration
928dnl
Dan Nicholson297e16c2008-05-05 15:42:53 -0700929AC_ARG_ENABLE([glu],
Dan Nicholson79ad4582007-12-07 19:11:01 -0800930 [AS_HELP_STRING([--disable-glu],
931 [enable OpenGL Utility library @<:@default=enabled@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700932 [enable_glu="$enableval"],
933 [enable_glu=yes])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700934if test "x$enable_glu" = xyes; then
935 SRC_DIRS="$SRC_DIRS glu"
936
Dan Nicholson979ff512007-12-05 18:47:01 -0800937 case "$mesa_driver" in
938 osmesa)
Dan Nicholson6689f9e2007-12-05 21:04:15 -0800939 # If GLU is available and we have libOSMesa (not 16 or 32),
940 # we can build the osdemos
Dan Nicholson8e4d1472007-11-15 08:59:57 -0800941 if test "$with_demos" = yes && test "$osmesa_bits" = 8; then
Dan Nicholson6689f9e2007-12-05 21:04:15 -0800942 PROGRAM_DIRS="$PROGRAM_DIRS osdemos"
943 fi
Dan Nicholsondca1b792007-10-23 09:25:58 -0700944
Dan Nicholson979ff512007-12-05 18:47:01 -0800945 # Link libGLU to libOSMesa instead of libGL
946 GLU_LIB_DEPS=""
Dan Nicholson8be02fc2008-12-14 09:35:29 -0800947 GLU_PC_REQ="osmesa"
Dan Nicholson88586332007-11-15 08:59:57 -0800948 if test "$enable_static" = no; then
949 GLU_MESA_DEPS='-l$(OSMESA_LIB)'
950 else
951 GLU_MESA_DEPS=""
952 fi
Dan Nicholson979ff512007-12-05 18:47:01 -0800953 ;;
954 *)
Dan Nicholson88586332007-11-15 08:59:57 -0800955 # If static, empty GLU_LIB_DEPS and add libs for programs to link
Dan Nicholson71e208b2008-11-24 11:01:57 -0800956 GLU_PC_REQ="gl"
957 GLU_PC_LIB_PRIV="-lm"
Dan Nicholson88586332007-11-15 08:59:57 -0800958 if test "$enable_static" = no; then
959 GLU_LIB_DEPS="-lm"
960 GLU_MESA_DEPS='-l$(GL_LIB)'
961 else
962 GLU_LIB_DEPS=""
963 GLU_MESA_DEPS=""
964 APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++"
965 fi
Dan Nicholson979ff512007-12-05 18:47:01 -0800966 ;;
967 esac
Dan Nicholsondca1b792007-10-23 09:25:58 -0700968fi
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -0700969if test "$enable_static" = no; then
970 GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS"
971fi
Dan Nicholson71e208b2008-11-24 11:01:57 -0800972GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS"
Dan Nicholson297e16c2008-05-05 15:42:53 -0700973AC_SUBST([GLU_LIB_DEPS])
974AC_SUBST([GLU_MESA_DEPS])
Dan Nicholson71e208b2008-11-24 11:01:57 -0800975AC_SUBST([GLU_PC_REQ])
976AC_SUBST([GLU_PC_REQ_PRIV])
Dan Nicholson71e208b2008-11-24 11:01:57 -0800977AC_SUBST([GLU_PC_LIB_PRIV])
978AC_SUBST([GLU_PC_CFLAGS])
Dan Nicholsondca1b792007-10-23 09:25:58 -0700979
980dnl
981dnl GLw configuration
982dnl
Dan Nicholson297e16c2008-05-05 15:42:53 -0700983AC_ARG_ENABLE([glw],
Dan Nicholson79ad4582007-12-07 19:11:01 -0800984 [AS_HELP_STRING([--disable-glw],
985 [enable Xt/Motif widget library @<:@default=enabled@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -0700986 [enable_glw="$enableval"],
987 [enable_glw=yes])
Dan Nicholson979ff512007-12-05 18:47:01 -0800988dnl Don't build GLw on osmesa
989if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then
990 AC_MSG_WARN([Disabling GLw since the driver is OSMesa])
991 enable_glw=no
992fi
Dan Nicholson776c60d2008-07-18 07:40:41 -0700993AC_ARG_ENABLE([motif],
994 [AS_HELP_STRING([--enable-motif],
995 [use Motif widgets in GLw @<:@default=disabled@:>@])],
996 [enable_motif="$enableval"],
997 [enable_motif=no])
998
Dan Nicholsondca1b792007-10-23 09:25:58 -0700999if test "x$enable_glw" = xyes; then
1000 SRC_DIRS="$SRC_DIRS glw"
1001 if test "$x11_pkgconfig" = yes; then
Dan Nicholson297e16c2008-05-05 15:42:53 -07001002 PKG_CHECK_MODULES([GLW],[x11 xt])
Dan Nicholson71e208b2008-11-24 11:01:57 -08001003 GLW_PC_REQ_PRIV="x11 xt"
Dan Nicholsondca1b792007-10-23 09:25:58 -07001004 GLW_LIB_DEPS="$GLW_LIBS"
1005 else
1006 # should check these...
Dan Nicholson776c60d2008-07-18 07:40:41 -07001007 GLW_LIB_DEPS="$X_LIBS -lXt -lX11"
Dan Nicholson71e208b2008-11-24 11:01:57 -08001008 GLW_PC_LIB_PRIV="$GLW_LIB_DEPS"
1009 GLW_PC_CFLAGS="$X11_INCLUDES"
Dan Nicholson776c60d2008-07-18 07:40:41 -07001010 fi
1011
1012 GLW_SOURCES="GLwDrawA.c"
1013 MOTIF_CFLAGS=
1014 if test "x$enable_motif" = xyes; then
1015 GLW_SOURCES="$GLW_SOURCES GLwMDrawA.c"
1016 AC_PATH_PROG([MOTIF_CONFIG], [motif-config], [no])
1017 if test "x$MOTIF_CONFIG" != xno; then
1018 MOTIF_CFLAGS=`$MOTIF_CONFIG --cflags`
1019 MOTIF_LIBS=`$MOTIF_CONFIG --libs`
1020 else
1021 AC_CHECK_HEADER([Xm/PrimitiveP.h], [],
1022 [AC_MSG_ERROR([Can't locate Motif headers])])
1023 AC_CHECK_LIB([Xm], [XmGetPixmap], [MOTIF_LIBS="-lXm"],
1024 [AC_MSG_ERROR([Can't locate Motif Xm library])])
1025 fi
1026 # MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11
1027 GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS"
Dan Nicholson71e208b2008-11-24 11:01:57 -08001028 GLW_PC_LIB_PRIV="$MOTIF_LIBS $GLW_PC_LIB_PRIV"
1029 GLW_PC_CFLAGS="$MOTIF_CFLAGS $GLW_PC_CFLAGS"
Dan Nicholsondca1b792007-10-23 09:25:58 -07001030 fi
1031
Dan Nicholson88586332007-11-15 08:59:57 -08001032 # If static, empty GLW_LIB_DEPS and add libs for programs to link
Alan Coopersmith3cf6e622009-03-23 16:51:54 -07001033 GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV"
Dan Nicholson88586332007-11-15 08:59:57 -08001034 if test "$enable_static" = no; then
1035 GLW_MESA_DEPS='-l$(GL_LIB)'
Alan Coopersmith3cf6e622009-03-23 16:51:54 -07001036 GLW_LIB_DEPS="$GLW_LIB_DEPS"
Dan Nicholson88586332007-11-15 08:59:57 -08001037 else
1038 APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
1039 GLW_LIB_DEPS=""
1040 GLW_MESA_DEPS=""
1041 fi
Dan Nicholsondca1b792007-10-23 09:25:58 -07001042fi
Dan Nicholson297e16c2008-05-05 15:42:53 -07001043AC_SUBST([GLW_LIB_DEPS])
1044AC_SUBST([GLW_MESA_DEPS])
Dan Nicholson776c60d2008-07-18 07:40:41 -07001045AC_SUBST([GLW_SOURCES])
1046AC_SUBST([MOTIF_CFLAGS])
Dan Nicholson71e208b2008-11-24 11:01:57 -08001047AC_SUBST([GLW_PC_REQ_PRIV])
1048AC_SUBST([GLW_PC_LIB_PRIV])
1049AC_SUBST([GLW_PC_CFLAGS])
Dan Nicholsondca1b792007-10-23 09:25:58 -07001050
1051dnl
1052dnl GLUT configuration
1053dnl
1054if test -f "$srcdir/include/GL/glut.h"; then
1055 default_glut=yes
1056else
1057 default_glut=no
1058fi
Dan Nicholson297e16c2008-05-05 15:42:53 -07001059AC_ARG_ENABLE([glut],
Dan Nicholson79ad4582007-12-07 19:11:01 -08001060 [AS_HELP_STRING([--disable-glut],
1061 [enable GLUT library @<:@default=enabled if source available@:>@])],
Dan Nicholson297e16c2008-05-05 15:42:53 -07001062 [enable_glut="$enableval"],
1063 [enable_glut="$default_glut"])
Dan Nicholsondca1b792007-10-23 09:25:58 -07001064
1065dnl Can't build glut if GLU not available
1066if test "x$enable_glu$enable_glut" = xnoyes; then
1067 AC_MSG_WARN([Disabling glut since GLU is disabled])
1068 enable_glut=no
1069fi
Dan Nicholson979ff512007-12-05 18:47:01 -08001070dnl Don't build glut on osmesa
1071if test "x$enable_glut" = xyes && test "$mesa_driver" = osmesa; then
1072 AC_MSG_WARN([Disabling glut since the driver is OSMesa])
1073 enable_glut=no
1074fi
1075
Dan Nicholsondca1b792007-10-23 09:25:58 -07001076if test "x$enable_glut" = xyes; then
1077 SRC_DIRS="$SRC_DIRS glut/glx"
1078 GLUT_CFLAGS=""
1079 if test "x$GCC" = xyes; then
1080 GLUT_CFLAGS="-fexceptions"
1081 fi
1082 if test "$x11_pkgconfig" = yes; then
Dan Nicholson297e16c2008-05-05 15:42:53 -07001083 PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
Dan Nicholson71e208b2008-11-24 11:01:57 -08001084 GLUT_PC_REQ_PRIV="x11 xmu xi"
Dan Nicholsondca1b792007-10-23 09:25:58 -07001085 GLUT_LIB_DEPS="$GLUT_LIBS"
1086 else
1087 # should check these...
Dan Nicholson70d0c832007-12-07 11:12:20 -08001088 GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
Dan Nicholson71e208b2008-11-24 11:01:57 -08001089 GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
1090 GLUT_PC_CFLAGS="$X11_INCLUDES"
Dan Nicholsondca1b792007-10-23 09:25:58 -07001091 fi
Alan Coopersmith3cf6e622009-03-23 16:51:54 -07001092 GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
1093 GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"
Dan Nicholsondca1b792007-10-23 09:25:58 -07001094
1095 # If glut is available, we can build most programs
Dan Nicholson8e4d1472007-11-15 08:59:57 -08001096 if test "$with_demos" = yes; then
1097 PROGRAM_DIRS="$PROGRAM_DIRS demos redbook samples glsl"
1098 fi
Dan Nicholsondca1b792007-10-23 09:25:58 -07001099
Dan Nicholson88586332007-11-15 08:59:57 -08001100 # If static, empty GLUT_LIB_DEPS and add libs for programs to link
1101 if test "$enable_static" = no; then
1102 GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)'
1103 else
1104 APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS"
1105 GLUT_LIB_DEPS=""
1106 GLUT_MESA_DEPS=""
1107 fi
Dan Nicholsondca1b792007-10-23 09:25:58 -07001108fi
Dan Nicholson297e16c2008-05-05 15:42:53 -07001109AC_SUBST([GLUT_LIB_DEPS])
1110AC_SUBST([GLUT_MESA_DEPS])
1111AC_SUBST([GLUT_CFLAGS])
Dan Nicholson71e208b2008-11-24 11:01:57 -08001112AC_SUBST([GLUT_PC_REQ_PRIV])
1113AC_SUBST([GLUT_PC_LIB_PRIV])
1114AC_SUBST([GLUT_PC_CFLAGS])
Dan Nicholsondca1b792007-10-23 09:25:58 -07001115
1116dnl
1117dnl Program library dependencies
1118dnl Only libm is added here if necessary as the libraries should
1119dnl be pulled in by the linker
1120dnl
1121if test "x$APP_LIB_DEPS" = x; then
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -07001122 case "$host_os" in
1123 solaris*)
1124 APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm"
1125 ;;
Jon TURNEY7eed6ab2009-06-08 16:02:18 +01001126 cygwin*)
1127 APP_LIB_DEPS="-lX11"
1128 ;;
Alan Coopersmithe1f9adc2008-06-20 17:58:53 -07001129 *)
1130 APP_LIB_DEPS="-lm"
1131 ;;
1132 esac
Dan Nicholsondca1b792007-10-23 09:25:58 -07001133fi
Dan Nicholson297e16c2008-05-05 15:42:53 -07001134AC_SUBST([APP_LIB_DEPS])
1135AC_SUBST([PROGRAM_DIRS])
Dan Nicholsondca1b792007-10-23 09:25:58 -07001136
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +01001137dnl
1138dnl Gallium configuration
1139dnl
1140AC_ARG_ENABLE([gallium],
1141 [AS_HELP_STRING([--disable-gallium],
1142 [build gallium @<:@default=enabled@:>@])],
1143 [enable_gallium="$enableval"],
1144 [enable_gallium=yes])
1145if test "x$enable_gallium" = xyes; then
1146 SRC_DIRS="$SRC_DIRS gallium gallium/winsys"
1147fi
Dan Nicholsondca1b792007-10-23 09:25:58 -07001148
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001149dnl
1150dnl Gallium state trackers configuration
1151dnl
1152AC_ARG_WITH([state-trackers],
1153 [AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@],
1154 [comma delimited state_trackers list, e.g.
1155 "egl,glx" @<:@default=auto@:>@])],
1156 [with_state_trackers="$withval"],
1157 [with_state_trackers=yes])
1158
1159case "$with_state_trackers" in
1160no)
1161 GALLIUM_STATE_TRACKERS_DIRS=""
1162 ;;
1163yes)
1164 # look at what else is built
1165 case "$mesa_driver" in
Jakob Bornecrantz373e6712009-04-18 23:13:56 +01001166 xlib)
1167 GALLIUM_STATE_TRACKERS_DIRS=glx
1168 ;;
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001169 dri)
Jakob Bornecrantzbc0532b2009-12-04 18:50:29 +00001170 GALLIUM_STATE_TRACKERS_DIRS="dri"
1171 if test "x$enable_egl" = xyes; then
Chia-I Wu3c967a92010-01-22 16:31:43 +08001172 GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl"
Jakob Bornecrantzbc0532b2009-12-04 18:50:29 +00001173 fi
1174 # Have only tested st/xorg on 1.6.0 servers
1175 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0],
1176 HAVE_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg",
1177 HAVE_XORG="no")
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001178 ;;
1179 esac
1180 ;;
1181*)
1182 # verify the requested state tracker exist
1183 state_trackers=`IFS=', '; echo $with_state_trackers`
1184 for tracker in $state_trackers; do
1185 test -d "$srcdir/src/gallium/state_trackers/$tracker" || \
1186 AC_MSG_ERROR([state tracker '$tracker' doesn't exist])
Dan Nicholson66f97862009-04-29 12:11:43 -07001187
Chia-I Wue5d351d2009-12-23 11:18:00 +08001188 case "$tracker" in
Chia-I Wu3c967a92010-01-22 16:31:43 +08001189 egl)
Chia-I Wue5d351d2009-12-23 11:18:00 +08001190 if test "x$enable_egl" != xyes; then
Chia-I Wu3c967a92010-01-22 16:31:43 +08001191 AC_MSG_ERROR([cannot build egl state tracker without EGL library])
Chia-I Wue5d351d2009-12-23 11:18:00 +08001192 fi
1193 ;;
1194 xorg)
Dave Airliee9d6ab72009-09-21 13:26:48 +10001195 PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
Jakob Bornecrantz5c4bdbd2009-10-15 01:24:53 +01001196 HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
Dave Airliee9d6ab72009-09-21 13:26:48 +10001197 HAVE_XEXTPROTO_71="no")
Chia-I Wue5d351d2009-12-23 11:18:00 +08001198 ;;
1199 es)
1200 # mesa/es is required to build es state tracker
Chia-I Wu99a37ed2010-01-05 17:39:05 +08001201 CORE_DIRS="$CORE_DIRS mesa/es"
Chia-I Wue5d351d2009-12-23 11:18:00 +08001202 ;;
1203 esac
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001204 done
1205 GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
1206 ;;
1207esac
1208
Chia-I Wu49381d62010-01-11 01:23:01 +08001209AC_ARG_WITH([egl-displays],
1210 [AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@],
1211 [comma delimited native displays libEGL supports, e.g.
Chia-I Wua68b51d2010-01-03 19:24:04 +08001212 "x11,kms" @<:@default=auto@:>@])],
Chia-I Wu49381d62010-01-11 01:23:01 +08001213 [with_egl_displays="$withval"],
1214 [with_egl_displays=yes])
1215
1216EGL_DISPLAYS=""
1217case "$with_egl_displays" in
1218yes)
1219 if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then
1220 EGL_DISPLAYS="x11"
1221 fi
1222 ;;
1223*)
1224 if test "x$enable_egl" != xyes; then
1225 AC_MSG_ERROR([cannot build egl state tracker without EGL library])
1226 fi
1227 # verify the requested driver directories exist
1228 egl_displays=`IFS=', '; echo $with_egl_displays`
1229 for dpy in $egl_displays; do
Chia-I Wu3c967a92010-01-22 16:31:43 +08001230 test -d "$srcdir/src/gallium/state_trackers/egl/$dpy" || \
Chia-I Wu49381d62010-01-11 01:23:01 +08001231 AC_MSG_ERROR([EGL display '$dpy' does't exist])
1232 done
1233 EGL_DISPLAYS="$egl_displays"
1234 ;;
1235esac
1236AC_SUBST([EGL_DISPLAYS])
1237
Chia-I Wu28c3e572010-01-23 20:18:43 +08001238AC_ARG_WITH([egl-driver-dir],
1239 [AS_HELP_STRING([--with-egl-driver-dir=DIR],
1240 [directory for EGL drivers [[default=${libdir}/egl]]])],
1241 [EGL_DRIVER_INSTALL_DIR="$withval"],
1242 [EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
1243AC_SUBST([EGL_DRIVER_INSTALL_DIR])
1244
Joel Bosveld8acca482009-03-06 08:46:08 +09001245AC_ARG_WITH([xorg-driver-dir],
1246 [AS_HELP_STRING([--with-xorg-driver-dir=DIR],
1247 [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
1248 [XORG_DRIVER_INSTALL_DIR="$withval"],
1249 [XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
1250AC_SUBST([XORG_DRIVER_INSTALL_DIR])
1251
Tom Fogal7085dce2009-08-13 19:40:30 -06001252AC_ARG_WITH([max-width],
1253 [AS_HELP_STRING([--with-max-width=N],
1254 [Maximum framebuffer width (4096)])],
1255 [DEFINES="${DEFINES} -DMAX_WIDTH=${withval}";
1256 AS_IF([test "${withval}" -gt "4096"],
1257 [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
1258)
1259AC_ARG_WITH([max-height],
1260 [AS_HELP_STRING([--with-max-height=N],
1261 [Maximum framebuffer height (4096)])],
1262 [DEFINES="${DEFINES} -DMAX_HEIGHT=${withval}";
1263 AS_IF([test "${withval}" -gt "4096"],
1264 [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
1265)
1266
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001267dnl
Jakob Bornecrantz60769b22009-11-12 01:28:26 +01001268dnl Gallium SVGA configuration
1269dnl
1270AC_ARG_ENABLE([gallium-svga],
Jakob Bornecrantz5e6fff72009-07-19 09:22:31 +02001271 [AS_HELP_STRING([--enable-gallium-svga],
1272 [build gallium SVGA @<:@default=disabled@:>@])],
Jakob Bornecrantz60769b22009-11-12 01:28:26 +01001273 [enable_gallium_svga="$enableval"],
Jakob Bornecrantz5e6fff72009-07-19 09:22:31 +02001274 [enable_gallium_svga=auto])
Jakob Bornecrantz60769b22009-11-12 01:28:26 +01001275if test "x$enable_gallium_svga" = xyes; then
1276 GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS vmware"
1277 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
Jakob Bornecrantz5e6fff72009-07-19 09:22:31 +02001278elif test "x$enable_gallium_svga" = xauto; then
1279 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
Jakob Bornecrantz60769b22009-11-12 01:28:26 +01001280fi
1281
1282dnl
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001283dnl Gallium Intel configuration
1284dnl
1285AC_ARG_ENABLE([gallium-intel],
Jakob Bornecrantz8ac25032009-12-04 16:01:41 +00001286 [AS_HELP_STRING([--enable-gallium-intel],
1287 [build gallium intel @<:@default=disabled@:>@])],
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001288 [enable_gallium_intel="$enableval"],
Jakob Bornecrantz8ac25032009-12-04 16:01:41 +00001289 [enable_gallium_intel=auto])
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001290if test "x$enable_gallium_intel" = xyes; then
Jakob Bornecrantzce4f23a2009-11-04 23:02:13 +00001291 GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel i965"
1292 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
Jakob Bornecrantz8ac25032009-12-04 16:01:41 +00001293elif test "x$enable_gallium_intel" = xauto; then
Keith Whitwellaa026832009-12-22 09:40:39 +00001294 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001295fi
1296
1297dnl
1298dnl Gallium Radeon configuration
1299dnl
1300AC_ARG_ENABLE([gallium-radeon],
1301 [AS_HELP_STRING([--enable-gallium-radeon],
1302 [build gallium radeon @<:@default=disabled@:>@])],
1303 [enable_gallium_radeon="$enableval"],
Jakob Bornecrantz877cadb2010-01-14 22:51:25 +00001304 [enable_gallium_radeon=auto])
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001305if test "x$enable_gallium_radeon" = xyes; then
1306 GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS radeon"
Jakob Bornecrantzd67bd602009-02-20 11:03:18 +00001307 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
Jakob Bornecrantz877cadb2010-01-14 22:51:25 +00001308elif test "x$enable_gallium_radeon" = xauto; then
1309 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001310fi
1311
1312dnl
Thierry Vignaud1402ea82009-09-14 11:48:51 -06001313dnl Gallium Nouveau configuration
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001314dnl
1315AC_ARG_ENABLE([gallium-nouveau],
1316 [AS_HELP_STRING([--enable-gallium-nouveau],
1317 [build gallium nouveau @<:@default=disabled@:>@])],
1318 [enable_gallium_nouveau="$enableval"],
1319 [enable_gallium_nouveau=no])
1320if test "x$enable_gallium_nouveau" = xyes; then
1321 GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS nouveau"
Ben Skeggsbc466be2009-06-04 10:19:04 +10001322 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv04 nv10 nv20 nv30 nv40 nv50"
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001323fi
1324
Chia-I Wua1306f42010-01-22 15:51:51 +08001325dnl
1326dnl Gallium swrast configuration
1327dnl
1328AC_ARG_ENABLE([gallium-swrast],
1329 [AS_HELP_STRING([--enable-gallium-swrast],
1330 [build gallium swrast @<:@default=disabled@:>@])],
1331 [enable_gallium_swrast="$enableval"],
1332 [enable_gallium_swrast=auto])
1333if test "x$enable_gallium_swrast" = xyes; then
1334 GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS swrast"
1335fi
1336
Chia-I Wu99a37ed2010-01-05 17:39:05 +08001337dnl prepend CORE_DIRS to SRC_DIRS
1338SRC_DIRS="$CORE_DIRS $SRC_DIRS"
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001339
Dan Nicholsondca1b792007-10-23 09:25:58 -07001340dnl Restore LDFLAGS and CPPFLAGS
1341LDFLAGS="$_SAVE_LDFLAGS"
1342CPPFLAGS="$_SAVE_CPPFLAGS"
1343
1344dnl Substitute the config
Dan Nicholsonf64d6fe2007-12-12 17:57:45 -08001345AC_CONFIG_FILES([configs/autoconf])
Dan Nicholsondca1b792007-10-23 09:25:58 -07001346
Dan Nicholsonaab38cf2007-12-11 08:21:51 -08001347dnl Replace the configs/current symlink
Dan Nicholsone14ebbc2008-05-06 11:28:43 -07001348AC_CONFIG_COMMANDS([configs],[
Dan Nicholsonaab38cf2007-12-11 08:21:51 -08001349if test -f configs/current || test -L configs/current; then
1350 rm -f configs/current
1351fi
1352ln -s autoconf configs/current
Dan Nicholsone14ebbc2008-05-06 11:28:43 -07001353])
1354
1355AC_OUTPUT
Dan Nicholsonaab38cf2007-12-11 08:21:51 -08001356
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001357dnl
1358dnl Output some configuration info for the user
1359dnl
1360echo ""
1361echo " prefix: $prefix"
1362echo " exec_prefix: $exec_prefix"
1363echo " libdir: $libdir"
Dan Nicholson11ac5b22008-07-03 09:17:44 -07001364echo " includedir: $includedir"
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001365
1366dnl Driver info
1367echo ""
1368echo " Driver: $mesa_driver"
Dan Nicholson544ab202007-12-30 08:41:53 -08001369if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then
1370 echo " OSMesa: lib$OSMESA_LIB"
1371else
1372 echo " OSMesa: no"
1373fi
1374if test "$mesa_driver" = dri; then
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001375 # cleanup the drivers var
1376 dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
Florent Thoumieb5095ab2008-07-28 14:44:43 +01001377if test "x$DRI_DIRS" = x; then
1378 echo " DRI drivers: no"
1379else
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001380 echo " DRI drivers: $dri_dirs"
Florent Thoumieb5095ab2008-07-28 14:44:43 +01001381fi
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001382 echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
Dan Nicholson544ab202007-12-30 08:41:53 -08001383fi
RALOVICH, Kristóf5f19f5c2008-11-04 11:53:32 +01001384echo " Use XCB: $enable_xcb"
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001385
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +01001386echo ""
1387if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then
1388 echo " Gallium: yes"
1389 echo " Gallium dirs: $GALLIUM_DIRS"
1390 echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
Jakob Bornecrantz3ede3772009-02-13 00:57:47 +01001391 echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS"
Jakob Bornecrantzd67bd602009-02-20 11:03:18 +00001392 echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
Jakob Bornecrantz7e54d7d2009-02-11 02:38:21 +01001393 echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS"
1394else
1395 echo " Gallium: no"
1396fi
1397
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001398dnl Libraries
1399echo ""
1400echo " Shared libs: $enable_shared"
1401echo " Static libs: $enable_static"
Kristian Høgsberg42fa0092010-02-03 10:18:28 -05001402if test "$enable_egl" = yes; then
1403 echo " EGL: $EGL_DRIVERS_DIRS"
1404else
1405 echo " EGL: no"
1406fi
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001407echo " GLU: $enable_glu"
Dan Nicholson776c60d2008-07-18 07:40:41 -07001408echo " GLw: $enable_glw (Motif: $enable_motif)"
Dan Nicholson9cad8e32007-11-30 08:49:57 -08001409echo " glut: $enable_glut"
1410
1411dnl Programs
1412# cleanup the programs var for display
1413program_dirs=`echo $PROGRAM_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
1414if test "x$program_dirs" = x; then
1415 echo " Demos: no"
1416else
1417 echo " Demos: $program_dirs"
1418fi
1419
Dan Nicholson16a07fb2007-12-12 09:12:15 -08001420dnl Compiler options
1421# cleanup the CFLAGS/CXXFLAGS/DEFINES vars
1422cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
1423 $SED 's/^ *//;s/ */ /;s/ *$//'`
1424cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
1425 $SED 's/^ *//;s/ */ /;s/ *$//'`
1426defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'`
1427echo ""
1428echo " CFLAGS: $cflags"
1429echo " CXXFLAGS: $cxxflags"
1430echo " Macros: $defines"
1431
Dan Nicholsondca1b792007-10-23 09:25:58 -07001432echo ""
Dan Nicholsonb6459422008-03-24 10:01:50 -07001433echo " Run '${MAKE-make}' to build Mesa"
Dan Nicholsondca1b792007-10-23 09:25:58 -07001434echo ""