1 dnl Process this file with autoconf to create configure.
6 dnl Make version number available to autoconf and configure
7 m4_define(mesa_major, 7)
8 m4_define(mesa_minor, 1)
9 m4_define(mesa_tiny, 0)
10 m4_define(mesa_version, [mesa_major().mesa_minor().mesa_tiny()])
12 AC_INIT([Mesa],[mesa_version()],
13 [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
14 AC_CONFIG_AUX_DIR(bin)
17 dnl Substitute the version number into shell variables
18 MESA_MAJOR=mesa_major()
19 MESA_MINOR=mesa_minor()
29 AC_PATH_PROG(MAKE, gmake, [not_found])
30 if test "x$MAKE" = "xnot_found"; then
31 AC_PATH_PROG(MAKE, make)
33 AC_PATH_PROG(MKDEP, makedepend)
34 AC_PATH_PROG(SED, sed)
36 MKDEP_OPTIONS=-fdepend
37 dnl Ask gcc where it's keeping its secret headers
38 if test "x$GCC" = xyes; then
39 GCC_INCLUDES=`$CC -print-file-name=include`
40 if test "x$GCC_INCLUDES" != x; then
41 MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
44 AC_SUBST(MKDEP_OPTIONS)
46 dnl Make sure the pkg-config macros are defined
47 m4_ifdef([PKG_PROG_PKG_CONFIG],,[
48 AC_MSG_ERROR([The pkg-config autoconf macros are not defined.
49 Did you run 'make configure'?])]
53 dnl LIB_DIR - library basename
54 LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
57 dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later
58 _SAVE_LDFLAGS="$LDFLAGS"
59 AC_ARG_VAR(EXTRA_LIB_PATH,[Extra -L paths for the linker])
60 AC_SUBST(EXTRA_LIB_PATH)
62 dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later
63 _SAVE_CPPFLAGS="$CPPFLAGS"
64 AC_ARG_VAR(X11_INCLUDES,[Extra -I paths for X11 headers])
65 AC_SUBST(X11_INCLUDES)
72 if test "x$GCC" = xyes; then
73 DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
75 DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN"
79 dnl Add flags for gcc and g++
80 if test "x$GCC" = xyes; then
81 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
83 # Work around aliasing bugs - developers should comment this out
84 CFLAGS="$CFLAGS -fno-strict-aliasing"
86 if test "x$GXX" = xyes; then
87 CXXFLAGS="$CXXFLAGS -Wall"
89 # Work around aliasing bugs - developers should comment this out
90 CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
93 dnl These should be unnecessary, but let the user set them if they want
94 AC_ARG_VAR(OPT_FLAGS, [Additional optimization flags for the compiler.
95 Default is to use CFLAGS.])
96 AC_ARG_VAR(ARCH_FLAGS, [Additional architecture specific flags for the
97 compiler. Default is to use CFLAGS.])
102 dnl Hacks to enable 32 or 64 bit build
104 AC_ARG_ENABLE(32-bit,
105 [AS_HELP_STRING([--enable-32-bit],
106 [build 32-bit libraries @<:@default=auto@:>@])],
107 enable_32bit="$enableval",
110 if test "x$enable_32bit" = xyes; then
111 if test "x$GCC" = xyes; then
112 CFLAGS="$CFLAGS -m32"
114 if test "x$GXX" = xyes; then
115 CXXFLAGS="$CXXFLAGS -m32"
118 AC_ARG_ENABLE(64-bit,
119 [AS_HELP_STRING([--enable-64-bit],
120 [build 64-bit libraries @<:@default=auto@:>@])],
121 enable_64bit="$enableval",
124 if test "x$enable_64bit" = xyes; then
125 if test "x$GCC" = xyes; then
126 CFLAGS="$CFLAGS -m64"
128 if test "x$GXX" = xyes; then
129 CXXFLAGS="$CXXFLAGS -m64"
134 dnl shared/static libraries, mimic libtool options
136 AC_ARG_ENABLE(static,
137 [AS_HELP_STRING([--enable-static],
138 [build static libraries @<:@default=disabled@:>@])],
139 enable_static="$enableval",
142 case "x$enable_static" in
144 x ) enable_static=no ;;
146 AC_MSG_ERROR([Static library option '$enable_static' is not a valid])
149 AC_ARG_ENABLE(shared,
150 [AS_HELP_STRING([--disable-shared],
151 [build shared libraries @<:@default=enabled@:>@])],
152 enable_shared="$enableval",
155 case "x$enable_shared" in
157 x ) enable_shared=yes ;;
159 AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid])
163 dnl Can't have static and shared libraries, default to static if user
164 dnl explicitly requested. If both disabled, set to static since shared
165 dnl was explicitly requirested.
166 case "x$enable_static$enable_shared" in
168 AC_MSG_WARN([Can't build static and shared libraries, disabling shared])
172 AC_MSG_WARN([Can't disable both static and shared libraries, enabling static])
180 AC_ARG_VAR(MKLIB_OPTIONS,[Options for the Mesa library script, mklib])
181 if test "$enable_static" = yes; then
182 MKLIB_OPTIONS="$MKLIB_OPTIONS -static"
184 AC_SUBST(MKLIB_OPTIONS)
187 dnl other compiler options
190 [AS_HELP_STRING([--enable-debug],
191 [use debug compiler flags and macros @<:@default=disabled@:>@])],
192 enable_debug="$enableval",
195 if test "x$enable_debug" = xyes; then
196 DEFINES="$DEFINES -DDEBUG"
197 if test "x$GCC" = xyes; then
200 if test "x$GXX" = xyes; then
201 CXXFLAGS="$CXXFLAGS -g"
204 dnl These will be used near the end in the arch specific options
206 [AS_HELP_STRING([--disable-asm],
207 [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
208 enable_asm="$enableval",
215 if test "$enable_static" = yes; then
216 GL_LIB_NAME='lib$(GL_LIB).a'
217 GLU_LIB_NAME='lib$(GLU_LIB).a'
218 GLUT_LIB_NAME='lib$(GLUT_LIB).a'
219 GLW_LIB_NAME='lib$(GLW_LIB).a'
220 OSMESA_LIB_NAME='lib$(OSMESA_LIB).a'
222 GL_LIB_NAME='lib$(GL_LIB).so'
223 GLU_LIB_NAME='lib$(GLU_LIB).so'
224 GLUT_LIB_NAME='lib$(GLUT_LIB).so'
225 GLW_LIB_NAME='lib$(GLW_LIB).so'
226 OSMESA_LIB_NAME='lib$(OSMESA_LIB).so'
228 AC_SUBST(GL_LIB_NAME)
229 AC_SUBST(GLU_LIB_NAME)
230 AC_SUBST(GLUT_LIB_NAME)
231 AC_SUBST(GLW_LIB_NAME)
232 AC_SUBST(OSMESA_LIB_NAME)
235 dnl Driver configuration. Options are xlib, dri and osmesa right now.
236 dnl More later: directfb, fbdev, ...
239 [AS_HELP_STRING([--with-driver=DRIVER],
240 [driver for Mesa: xlib,dri,osmesa @<:@default=xlib@:>@])],
241 mesa_driver="$withval",
243 dnl Check for valid option
244 case "x$mesa_driver" in
248 AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option])
253 dnl Driver specific build directories
258 case "$mesa_driver" in
263 SRC_DIRS="glx/x11 $SRC_DIRS"
273 AC_SUBST(DRIVER_DIRS)
274 AC_SUBST(WINDOW_SYSTEM)
277 dnl User supplied program configuration
279 if test -d "$srcdir/progs/demos"; then
285 [AS_HELP_STRING([--with-demos@<:@=DIRS...@:>@],
286 [optional comma delimited demo directories to build
287 @<:@default=auto if source available@:>@])],
288 with_demos="$withval",
289 with_demos="$default_demos")
290 if test "x$with_demos" = x; then
294 dnl If $with_demos is yes, directories will be added as libs available
296 case "$with_demos" in
299 # If the driver isn't osmesa, we have libGL and can build xdemos
300 if test "$mesa_driver" != osmesa; then
301 PROGRAM_DIRS="xdemos"
305 # verify the requested demos directories exist
306 demos=`IFS=,; echo $with_demos`
307 for demo in $demos; do
308 test -d "$srcdir/progs/$demo" || \
309 AC_MSG_ERROR([Program directory '$demo' doesn't exist])
311 PROGRAM_DIRS="$demos"
316 dnl Find out if X is available. The variables have_x or no_x will be
317 dnl set and used later in the driver setups
319 if test -n "$PKG_CONFIG"; then
320 AC_MSG_CHECKING([pkg-config files for X11 are available])
321 if $PKG_CONFIG --exists x11; then
333 dnl Use the autoconf macro if no pkg-config files
334 if test "$x11_pkgconfig" = no; then
338 dnl We need X for xlib and dri, so bomb now if it's not found
339 case "$mesa_driver" in
341 if test "$no_x" = yes; then
342 AC_MSG_ERROR([X11 development libraries needed for $mesa_driver driver])
348 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux], [Build SELinux-aware Mesa (default: disabled)]), [MESA_SELINUX=$enableval], [MESA_SELINUX=no])
349 if test "x$enable_selinux" = "xyes"; then
350 AC_CHECK_HEADER(selinux/selinux.h,,
351 AC_MSG_ERROR([SELinux headers not found]))
352 AC_CHECK_LIB(selinux,is_selinux_enabled,,
353 AC_MSG_ERROR([SELinux library not found]))
354 SELINUX_LIBS="-lselinux"
355 DEFINES="$DEFINES -DMESA_SELINUX"
359 dnl libGL configuration per driver
361 case "$mesa_driver" in
363 if test "$x11_pkgconfig" = yes; then
364 PKG_CHECK_MODULES(XLIBGL, x11 xext)
365 X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
366 GL_LIB_DEPS="$XLIBGL_LIBS"
368 # should check these...
369 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
370 GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
372 GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
374 # if static, move the external libraries to the programs
375 # and empty the libraries for libGL
376 if test "$enable_static" = yes; then
377 APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS"
382 # DRI must be shared, I think
383 if test "$enable_static" = yes; then
384 AC_MSG_ERROR([Can't use static libraries for DRI drivers])
388 PKG_CHECK_MODULES(LIBDRM, libdrm)
390 # find the DRI deps for libGL
391 if test "$x11_pkgconfig" = yes; then
392 PKG_CHECK_MODULES(DRIGL, x11 xext xxf86vm xdamage xfixes)
393 X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
394 GL_LIB_DEPS="$DRIGL_LIBS"
396 # should check these...
397 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
398 GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
401 # need DRM libs, -lpthread, etc.
402 GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread -ldl"
405 # No libGL for osmesa
409 AC_SUBST(GL_LIB_DEPS)
414 if test "$mesa_driver" = xlib; then
415 DEFINES="$DEFINES -DUSE_XSHM"
421 AC_ARG_ENABLE(glx-tls,
422 [AS_HELP_STRING([--enable-glx-tls],
423 [enable TLS support in GLX @<:@default=disabled@:>@])],
424 GLX_USE_TLS="$enableval",
426 dnl Directory for DRI drivers
427 AC_ARG_WITH(dri-driverdir,
428 [AS_HELP_STRING([--with-dri-driverdir=DIR],
429 [directory for the DRI drivers @<:@/usr/X11R6/lib/modules/dri@:>@])],
430 DRI_DRIVER_INSTALL_DIR="$withval",
431 DRI_DRIVER_INSTALL_DIR='/usr/X11R6/lib/modules/dri')
432 AC_SUBST(DRI_DRIVER_INSTALL_DIR)
433 dnl Direct rendering or just indirect rendering
434 AC_ARG_ENABLE(driglx-direct,
435 [AS_HELP_STRING([--disable-driglx-direct],
436 [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
437 driglx_direct="$enableval",
440 dnl Which drivers to build - default is chosen by platform
441 AC_ARG_WITH(dri-drivers,
442 [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
443 [comma delimited DRI drivers, e.g. "i965,radeon,nouveau" @<:@default=auto@:>@])],
444 with_dri_drivers="$withval",
445 with_dri_drivers=yes)
446 if test "x$with_dri_drivers" = x; then
450 dnl If $with_dri_drivers is yes, directories will be added through
453 case "$with_dri_drivers" in
456 # verify the requested driver directories exist
457 dri_drivers=`IFS=,; echo $with_dri_drivers`
458 for driver in $dri_drivers; do
459 test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
460 AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist])
462 DRI_DIRS="$dri_drivers"
466 dnl Just default to no EGL for now
470 dnl Set DRI_DIRS, DEFINES and LIB_DEPS
471 if test "$mesa_driver" = dri; then
473 if test "x$GLX_USE_TLS" = xyes; then
474 DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
477 if test "x$USING_EGL" = x1; then
481 # Platform specific settings and drivers to build
484 DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
485 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS"
486 if test "x$driglx_direct" = xyes; then
487 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
492 # ffb, gamma, and sis are missing because they have not be
493 # converted to use the new interface. i810 are missing
494 # because there is no x86-64 system where they could *ever*
496 if test "x$DRI_DIRS" = x; then
497 DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \
498 savage tdfx unichrome"
502 # Build only the drivers for cards that exist on PowerPC.
503 # At some point MGA will be added, but not yet.
504 if test "x$DRI_DIRS" = x; then
505 DRI_DIRS="mach64 r128 r200 r300 radeon tdfx"
511 DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
512 DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
513 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
514 if test "x$driglx_direct" = xyes; then
515 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
517 if test "x$GXX" = xyes; then
518 CXXFLAGS="$CXXFLAGS -ansi -pedantic"
521 # ffb and gamma are missing because they have not been converted
522 # to use the new interface.
523 if test "x$DRI_DIRS" = x; then
524 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
525 unichrome savage sis"
531 if test "x$DRI_DIRS" = x; then
532 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
533 savage sis tdfx trident unichrome ffb"
536 DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
541 AC_ARG_WITH(expat, AS_HELP_STRING([--with-expat=DIR],
542 [expat install directory]),[
543 EXPAT_INCLUDES="-I$withval/include"
544 CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
545 LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
546 EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
548 AC_CHECK_HEADER(expat.h,,AC_MSG_ERROR([Expat required for DRI.]))
549 AC_CHECK_LIB(expat, XML_ParserCreate,,
550 AC_MSG_ERROR([Expat required for DRI.]))
552 # put all the necessary libs together
553 DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread -ldl"
556 AC_SUBST(EXPAT_INCLUDES)
557 AC_SUBST(DRI_LIB_DEPS)
560 dnl OSMesa configuration
562 if test "$mesa_driver" = xlib; then
563 default_gl_osmesa=yes
567 AC_ARG_ENABLE(gl-osmesa,
568 [AS_HELP_STRING([--enable-gl-osmesa],
569 [enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])],
570 gl_osmesa="$enableval",
571 gl_osmesa="$default_gl_osmesa")
572 if test "x$gl_osmesa" = xyes; then
573 if test "$mesa_driver" = osmesa; then
574 AC_MSG_ERROR([libGL is not available for OSMesa driver])
576 DRIVER_DIRS="$DRIVER_DIRS osmesa"
580 dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...)
581 AC_ARG_WITH(osmesa-bits,
582 [AS_HELP_STRING([--with-osmesa-bits=BITS],
583 [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])],
584 osmesa_bits="$withval",
586 if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then
587 AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver])
590 case "x$osmesa_bits" in
595 OSMESA_LIB="OSMesa$osmesa_bits"
596 DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
599 AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option])
604 case "$mesa_driver" in
606 # only link librararies with osmesa if shared
607 if test "$enable_static" = no; then
608 OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS"
615 # Link OSMesa to libGL otherwise
617 # only link librararies with osmesa if shared
618 if test "$enable_static" = no; then
619 OSMESA_MESA_DEPS='-l$(GL_LIB)'
625 AC_SUBST(OSMESA_LIB_DEPS)
626 AC_SUBST(OSMESA_MESA_DEPS)
629 dnl GLU configuration
632 [AS_HELP_STRING([--disable-glu],
633 [enable OpenGL Utility library @<:@default=enabled@:>@])],
634 enable_glu="$enableval",
636 if test "x$enable_glu" = xyes; then
637 SRC_DIRS="$SRC_DIRS glu"
639 case "$mesa_driver" in
641 # If GLU is available and we have libOSMesa (not 16 or 32),
642 # we can build the osdemos
643 if test "$with_demos" = yes && test "$osmesa_bits" = 8; then
644 PROGRAM_DIRS="$PROGRAM_DIRS osdemos"
647 # Link libGLU to libOSMesa instead of libGL
649 if test "$enable_static" = no; then
650 GLU_MESA_DEPS='-l$(OSMESA_LIB)'
656 # If static, empty GLU_LIB_DEPS and add libs for programs to link
657 if test "$enable_static" = no; then
659 GLU_MESA_DEPS='-l$(GL_LIB)'
663 APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++"
668 AC_SUBST(GLU_LIB_DEPS)
669 AC_SUBST(GLU_MESA_DEPS)
672 dnl GLw configuration
675 [AS_HELP_STRING([--disable-glw],
676 [enable Xt/Motif widget library @<:@default=enabled@:>@])],
677 enable_glw="$enableval",
679 dnl Don't build GLw on osmesa
680 if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then
681 AC_MSG_WARN([Disabling GLw since the driver is OSMesa])
684 if test "x$enable_glw" = xyes; then
685 SRC_DIRS="$SRC_DIRS glw"
686 if test "$x11_pkgconfig" = yes; then
687 PKG_CHECK_MODULES(GLW, x11 xt)
688 GLW_LIB_DEPS="$GLW_LIBS"
690 # should check these...
691 GLW_LIB_DEPS="$X_LIBS -lX11 -lXt"
694 # If static, empty GLW_LIB_DEPS and add libs for programs to link
695 if test "$enable_static" = no; then
696 GLW_MESA_DEPS='-l$(GL_LIB)'
698 APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
703 AC_SUBST(GLW_LIB_DEPS)
704 AC_SUBST(GLW_MESA_DEPS)
707 dnl GLUT configuration
709 if test -f "$srcdir/include/GL/glut.h"; then
715 [AS_HELP_STRING([--disable-glut],
716 [enable GLUT library @<:@default=enabled if source available@:>@])],
717 enable_glut="$enableval",
718 enable_glut="$default_glut")
720 dnl Can't build glut if GLU not available
721 if test "x$enable_glu$enable_glut" = xnoyes; then
722 AC_MSG_WARN([Disabling glut since GLU is disabled])
725 dnl Don't build glut on osmesa
726 if test "x$enable_glut" = xyes && test "$mesa_driver" = osmesa; then
727 AC_MSG_WARN([Disabling glut since the driver is OSMesa])
731 if test "x$enable_glut" = xyes; then
732 SRC_DIRS="$SRC_DIRS glut/glx"
734 if test "x$GCC" = xyes; then
735 GLUT_CFLAGS="-fexceptions"
737 if test "$x11_pkgconfig" = yes; then
738 PKG_CHECK_MODULES(GLUT, x11 xmu xi)
739 GLUT_LIB_DEPS="$GLUT_LIBS"
741 # should check these...
742 GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
744 GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
746 # If glut is available, we can build most programs
747 if test "$with_demos" = yes; then
748 PROGRAM_DIRS="$PROGRAM_DIRS demos redbook samples glsl"
751 # If static, empty GLUT_LIB_DEPS and add libs for programs to link
752 if test "$enable_static" = no; then
753 GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)'
755 APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS"
760 AC_SUBST(GLUT_LIB_DEPS)
761 AC_SUBST(GLUT_MESA_DEPS)
762 AC_SUBST(GLUT_CFLAGS)
765 dnl Program library dependencies
766 dnl Only libm is added here if necessary as the libraries should
767 dnl be pulled in by the linker
769 if test "x$APP_LIB_DEPS" = x; then
772 AC_SUBST(APP_LIB_DEPS)
773 AC_SUBST(PROGRAM_DIRS)
775 dnl Arch/platform-specific settings
782 AC_SUBST(ASM_SOURCES)
789 if test "x$enable_asm" = xyes; then
790 ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
791 ASM_SOURCES='$(X86_SOURCES)'
796 if test "x$enable_asm" = xyes; then
797 ASM_FLAGS="-DUSE_X86_64_ASM"
798 ASM_SOURCES='$(X86-64_SOURCES)'
799 ASM_API='$(X86-64_API)'
803 if test "x$enable_asm" = xyes; then
804 ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
805 ASM_SOURCES='$(PPC_SOURCES)'
815 if test "x$enable_asm" = xyes; then
816 ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
817 ASM_SOURCES='$(X86_SOURCES)'
822 if test "x$enable_asm" = xyes; then
823 ASM_FLAGS="-DUSE_X86_64_ASM"
824 ASM_SOURCES='$(X86-64_SOURCES)'
825 ASM_API='$(X86-64_API)'
832 dnl Restore LDFLAGS and CPPFLAGS
833 LDFLAGS="$_SAVE_LDFLAGS"
834 CPPFLAGS="$_SAVE_CPPFLAGS"
836 dnl Substitute the config
837 AC_CONFIG_FILES([configs/autoconf])
840 dnl Replace the configs/current symlink
841 if test -f configs/current || test -L configs/current; then
842 rm -f configs/current
844 ln -s autoconf configs/current
847 dnl Output some configuration info for the user
850 echo " prefix: $prefix"
851 echo " exec_prefix: $exec_prefix"
852 echo " libdir: $libdir"
856 echo " Driver: $mesa_driver"
857 if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then
858 echo " OSMesa: lib$OSMESA_LIB"
862 if test "$mesa_driver" = dri; then
863 # cleanup the drivers var
864 dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
865 echo " DRI drivers: $dri_dirs"
866 echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
871 echo " Shared libs: $enable_shared"
872 echo " Static libs: $enable_static"
873 echo " GLU: $enable_glu"
874 echo " GLw: $enable_glw"
875 echo " glut: $enable_glut"
878 # cleanup the programs var for display
879 program_dirs=`echo $PROGRAM_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
880 if test "x$program_dirs" = x; then
883 echo " Demos: $program_dirs"
887 # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
888 cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
889 $SED 's/^ *//;s/ */ /;s/ *$//'`
890 cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
891 $SED 's/^ *//;s/ */ /;s/ *$//'`
892 defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'`
894 echo " CFLAGS: $cflags"
895 echo " CXXFLAGS: $cxxflags"
896 echo " Macros: $defines"
899 echo " Run 'make' to build Mesa"