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, make)
30 AC_PATH_PROG(MKDEP, makedepend)
31 AC_PATH_PROG(SED, sed)
33 dnl Ask gcc where it's keeping its secret headers
34 if test "x$GCC" = xyes; then
35 GCC_PATH=$(gcc -print-search-dirs | sed -ne 's/install: //p')
36 MKDEP_OPTIONS="-fdepend -I${GCC_PATH}include"
38 MKDEP_OPTIONS=-fdepend
40 AC_SUBST(MKDEP_OPTIONS)
42 dnl Make sure the pkg-config macros are defined
43 m4_ifdef([PKG_PROG_PKG_CONFIG],,[
44 AC_MSG_ERROR([The pkg-config autoconf macros are not defined.
45 Did you run 'make configure'?])]
49 dnl LIB_DIR - library basename
50 LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
53 dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later
54 _SAVE_LDFLAGS="$LDFLAGS"
55 AC_ARG_VAR(EXTRA_LIB_PATH,[Extra -L paths for the linker])
56 AC_SUBST(EXTRA_LIB_PATH)
58 dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later
59 _SAVE_CPPFLAGS="$CPPFLAGS"
60 AC_ARG_VAR(X11_INCLUDES,[Extra -I paths for X11 headers])
61 AC_SUBST(X11_INCLUDES)
66 if test "x$GCC" = xyes; then
67 DEFINES="-D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
71 DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN"
75 dnl Add flags for gcc and g++
76 if test "x$GCC" = xyes; then
77 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
79 # Work around aliasing bugs - developers should comment this out
80 CFLAGS="$CFLAGS -fno-strict-aliasing"
82 if test "x$GXX" = xyes; then
83 CXXFLAGS="$CXXFLAGS -Wall"
85 # Work around aliasing bugs - developers should comment this out
86 CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
89 dnl These should be unnecessary, but let the user set them if they want
90 AC_ARG_VAR(OPT_FLAGS, [Additional optimization flags for the compiler.
91 Default is to use CFLAGS.])
92 AC_ARG_VAR(ARCH_FLAGS, [Additional architecture specific flags for the
93 compiler. Default is to use CFLAGS.])
98 dnl Hacks to enable 32 or 64 bit build
100 AC_ARG_ENABLE(32-bit,
101 [AS_HELP_STRING([--enable-32-bit],
102 [build 32-bit libraries @<:@default=auto@:>@])],
103 enable_32bit="$enableval",
106 if test "x$enable_32bit" = xyes; then
107 if test "x$GCC" = xyes; then
108 CFLAGS="$CFLAGS -m32"
110 if test "x$GXX" = xyes; then
111 CXXFLAGS="$CXXFLAGS -m32"
114 AC_ARG_ENABLE(64-bit,
115 [AS_HELP_STRING([--enable-64-bit],
116 [build 64-bit libraries @<:@default=auto@:>@])],
117 enable_64bit="$enableval",
120 if test "x$enable_64bit" = xyes; then
121 if test "x$GCC" = xyes; then
122 CFLAGS="$CFLAGS -m64"
124 if test "x$GXX" = xyes; then
125 CXXFLAGS="$CXXFLAGS -m64"
130 dnl shared/static libraries, mimic libtool options
132 AC_ARG_ENABLE(static,
133 [AS_HELP_STRING([--enable-static],
134 [build static libraries @<:@default=disabled@:>@])],
135 enable_static="$enableval",
138 case "x$enable_static" in
140 x ) enable_static=no ;;
142 AC_MSG_ERROR([Static library option '$enable_static' is not a valid])
145 AC_ARG_ENABLE(shared,
146 [AS_HELP_STRING([--disable-shared],
147 [build shared libraries @<:@default=enabled@:>@])],
148 enable_shared="$enableval",
151 case "x$enable_shared" in
153 x ) enable_shared=yes ;;
155 AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid])
159 dnl Can't have static and shared libraries, default to static if user
160 dnl explicitly requested. If both disabled, set to static since shared
161 dnl was explicitly requirested.
162 case "x$enable_static$enable_shared" in
164 AC_MSG_WARN([Can't build static and shared libraries, disabling shared])
168 AC_MSG_WARN([Can't disable both static and shared libraries, enabling static])
176 AC_ARG_VAR(MKLIB_OPTIONS,[Options for the Mesa library script, mklib])
177 if test "$enable_static" = yes; then
178 MKLIB_OPTIONS="$MKLIB_OPTIONS -static"
180 AC_SUBST(MKLIB_OPTIONS)
183 dnl other compiler options
186 [AS_HELP_STRING([--enable-debug],
187 [use debug compiler flags and macros @<:@default=disabled@:>@])],
188 enable_debug="$enableval",
191 if test "x$enable_debug" = xyes; then
192 DEFINES="$DEFINES -DDEBUG"
193 if test "x$GCC" = xyes; then
196 if test "x$GXX" = xyes; then
197 CXXFLAGS="$CXXFLAGS -g"
200 dnl These will be used near the end in the arch specific options
202 [AS_HELP_STRING([--disable-asm],
203 [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
204 enable_asm="$enableval",
211 if test "$enable_static" = yes; then
212 GL_LIB_NAME='lib$(GL_LIB).a'
213 GLU_LIB_NAME='lib$(GLU_LIB).a'
214 GLUT_LIB_NAME='lib$(GLUT_LIB).a'
215 GLW_LIB_NAME='lib$(GLW_LIB).a'
216 OSMESA_LIB_NAME='lib$(OSMESA_LIB).a'
218 GL_LIB_NAME='lib$(GL_LIB).so'
219 GLU_LIB_NAME='lib$(GLU_LIB).so'
220 GLUT_LIB_NAME='lib$(GLUT_LIB).so'
221 GLW_LIB_NAME='lib$(GLW_LIB).so'
222 OSMESA_LIB_NAME='lib$(OSMESA_LIB).so'
224 AC_SUBST(GL_LIB_NAME)
225 AC_SUBST(GLU_LIB_NAME)
226 AC_SUBST(GLUT_LIB_NAME)
227 AC_SUBST(GLW_LIB_NAME)
228 AC_SUBST(OSMESA_LIB_NAME)
231 dnl Driver configuration. Options are xlib, dri and osmesa right now.
232 dnl More later: directfb, fbdev, ...
235 [AS_HELP_STRING([--with-driver=DRIVER],
236 [driver for Mesa: xlib,dri,osmesa @<:@default=xlib@:>@])],
237 mesa_driver="$withval",
239 dnl Check for valid option
240 case "x$mesa_driver" in
244 AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option])
249 dnl Driver specific build directories
254 case "$mesa_driver" in
259 SRC_DIRS="glx/x11 $SRC_DIRS"
269 AC_SUBST(DRIVER_DIRS)
270 AC_SUBST(WINDOW_SYSTEM)
273 dnl User supplied program configuration
275 if test -d "$srcdir/progs/demos"; then
281 [AS_HELP_STRING([--with-demos@<:@=DIRS...@:>@],
282 [optional comma delimited demo directories to build
283 @<:@default=auto if source available@:>@])],
284 with_demos="$withval",
285 with_demos="$default_demos")
286 if test "x$with_demos" = x; then
290 dnl If $with_demos is yes, directories will be added as libs available
292 case "$with_demos" in
295 # verify the requested demos directories exist
296 demos=`IFS=,; echo $with_demos`
297 for demo in $demos; do
298 test -d "$srcdir/progs/$demo" || \
299 AC_MSG_ERROR([Program directory '$demo' doesn't exist])
301 PROGRAM_DIRS="$demos"
306 dnl Find out if X is available. The variables have_x or no_x will be
307 dnl set and used later in the driver setups
309 if test -n "$PKG_CONFIG"; then
310 AC_MSG_CHECKING([pkg-config files for X11 are available])
311 if $PKG_CONFIG --exists x11; then
323 dnl Use the autoconf macro if no pkg-config files
324 if test "$x11_pkgconfig" = no; then
328 dnl We need X for xlib and dri, so bomb now if it's not found
329 case "$mesa_driver" in
331 if test "$no_x" = yes; then
332 AC_MSG_ERROR([X11 development libraries needed for $mesa_driver driver])
338 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux], [Build SELinux-aware Mesa (default: disabled)]), [MESA_SELINUX=$enableval], [MESA_SELINUX=no])
339 if test "x$enable_selinux" = "xyes"; then
340 AC_CHECK_HEADER(selinux/selinux.h,,
341 AC_MSG_ERROR([SELinux headers not found]))
342 AC_CHECK_LIB(selinux,is_selinux_enabled,,
343 AC_MSG_ERROR([SELinux library not found]))
344 SELINUX_LIBS="-lselinux"
345 DEFINES="$DEFINES -DMESA_SELINUX"
349 dnl libGL configuration per driver
351 case "$mesa_driver" in
353 if test "$x11_pkgconfig" = yes; then
354 PKG_CHECK_MODULES(XLIBGL, x11 xext)
355 X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
356 GL_LIB_DEPS="$XLIBGL_LIBS"
358 # should check these...
359 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
360 GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
362 GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
364 # if static, move the external libraries to the programs
365 # and empty the libraries for libGL
366 if test "$enable_static" = yes; then
367 APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS"
372 # DRI must be shared, I think
373 if test "$enable_static" = yes; then
374 AC_MSG_ERROR([Can't use static libraries for DRI drivers])
378 PKG_CHECK_MODULES(LIBDRM, libdrm)
380 # find the DRI deps for libGL
381 if test "$x11_pkgconfig" = yes; then
382 PKG_CHECK_MODULES(DRIGL, x11 xext xxf86vm xdamage xfixes)
383 X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
384 GL_LIB_DEPS="$DRIGL_LIBS"
386 # should check these...
387 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
388 GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
391 # need DRM libs, -lpthread, etc.
392 GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread -ldl"
395 # No libGL for osmesa
399 AC_SUBST(GL_LIB_DEPS)
404 if test "$mesa_driver" = xlib; then
405 DEFINES="$DEFINES -DUSE_XSHM"
411 AC_ARG_ENABLE(glx-tls,
412 [AS_HELP_STRING([--enable-glx-tls],
413 [enable TLS support in GLX @<:@default=disabled@:>@])],
414 GLX_USE_TLS="$enableval",
416 dnl Directory for DRI drivers
417 AC_ARG_WITH(dri-driverdir,
418 [AS_HELP_STRING([--with-dri-driverdir=DIR],
419 [directory for the DRI drivers @<:@/usr/X11R6/lib/modules/dri@:>@])],
420 DRI_DRIVER_INSTALL_DIR="$withval",
421 DRI_DRIVER_INSTALL_DIR='/usr/X11R6/lib/modules/dri')
422 AC_SUBST(DRI_DRIVER_INSTALL_DIR)
423 dnl Direct rendering or just indirect rendering
424 AC_ARG_ENABLE(driglx-direct,
425 [AS_HELP_STRING([--disable-driglx-direct],
426 [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
427 driglx_direct="$enableval",
430 dnl Which drivers to build - default is chosen by platform
431 AC_ARG_WITH(dri-drivers,
432 [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
433 [comma delimited DRI drivers, e.g. "i965,radeon,nouveau" @<:@default=auto@:>@])],
434 with_dri_drivers="$withval",
435 with_dri_drivers=yes)
436 if test "x$with_dri_drivers" = x; then
440 dnl If $with_dri_drivers is yes, directories will be added through
443 case "$with_dri_drivers" in
446 # verify the requested driver directories exist
447 dri_drivers=`IFS=,; echo $with_dri_drivers`
448 for driver in $dri_drivers; do
449 test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
450 AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist])
452 DRI_DIRS="$dri_drivers"
456 dnl Just default to no EGL for now
460 dnl Set DRI_DIRS, DEFINES and LIB_DEPS
461 if test "$mesa_driver" = dri; then
463 if test "x$GLX_USE_TLS" = xyes; then
464 DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
467 if test "x$USING_EGL" = x1; then
471 # Platform specific settings and drivers to build
474 DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
475 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS"
476 if test "x$driglx_direct" = xyes; then
477 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
482 # ffb, gamma, and sis are missing because they have not be
483 # converted to use the new interface. i810 are missing
484 # because there is no x86-64 system where they could *ever*
486 if test "x$DRI_DIRS" = x; then
487 DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \
488 savage tdfx unichrome"
492 # Build only the drivers for cards that exist on PowerPC.
493 # At some point MGA will be added, but not yet.
494 if test "x$DRI_DIRS" = x; then
495 DRI_DIRS="mach64 r128 r200 r300 radeon tdfx"
501 DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
502 DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
503 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
504 if test "x$driglx_direct" = xyes; then
505 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
507 if test "x$GXX" = xyes; then
508 CXXFLAGS="$CXXFLAGS -ansi -pedantic"
511 # ffb and gamma are missing because they have not been converted
512 # to use the new interface.
513 if test "x$DRI_DIRS" = x; then
514 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
515 unichrome savage sis"
521 if test "x$DRI_DIRS" = x; then
522 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
523 savage sis tdfx trident unichrome ffb"
526 DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
531 AC_ARG_WITH(expat, AS_HELP_STRING([--with-expat=DIR],
532 [expat install directory]),[
533 EXPAT_INCLUDES="-I$withval/include"
534 CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
535 LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
536 EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
538 AC_CHECK_HEADER(expat.h,,AC_MSG_ERROR([Expat required for DRI.]))
539 AC_CHECK_LIB(expat, XML_ParserCreate,,
540 AC_MSG_ERROR([Expat required for DRI.]))
542 # put all the necessary libs together
543 DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread -ldl"
546 AC_SUBST(EXPAT_INCLUDES)
547 AC_SUBST(DRI_LIB_DEPS)
550 dnl OSMesa configuration
552 if test "$mesa_driver" = xlib; then
553 default_gl_osmesa=yes
557 AC_ARG_ENABLE(gl-osmesa,
558 [AS_HELP_STRING([--enable-gl-osmesa],
559 [enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])],
560 gl_osmesa="$enableval",
561 gl_osmesa="$default_gl_osmesa")
562 if test "x$gl_osmesa" = xyes; then
563 if test "$mesa_driver" = osmesa; then
564 AC_MSG_ERROR([libGL is not available for OSMesa driver])
566 DRIVER_DIRS="$DRIVER_DIRS osmesa"
570 dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...)
571 AC_ARG_WITH(osmesa-bits,
572 [AS_HELP_STRING([--with-osmesa-bits=BITS],
573 [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])],
574 osmesa_bits="$withval",
576 if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then
577 AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver])
580 case "x$osmesa_bits" in
585 OSMESA_LIB="OSMesa$osmesa_bits"
586 DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
589 AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option])
594 case "$mesa_driver" in
596 # only link librararies with osmesa if shared
597 if test "$enable_static" = no; then
598 OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS"
605 # Link OSMesa to libGL otherwise
607 # only link librararies with osmesa if shared
608 if test "$enable_static" = no; then
609 OSMESA_MESA_DEPS='-l$(GL_LIB)'
615 AC_SUBST(OSMESA_LIB_DEPS)
616 AC_SUBST(OSMESA_MESA_DEPS)
619 dnl GLU configuration
622 [AS_HELP_STRING([--disable-glu],
623 [enable OpenGL Utility library @<:@default=enabled@:>@])],
624 enable_glu="$enableval",
626 if test "x$enable_glu" = xyes; then
627 SRC_DIRS="$SRC_DIRS glu"
629 case "$mesa_driver" in
631 # If GLU is available and we have libOSMesa (not 16 or 32),
632 # we can build the osdemos
633 if test "$with_demos" = yes && test "$osmesa_bits" = 8; then
634 PROGRAM_DIRS="$PROGRAM_DIRS osdemos"
637 # Link libGLU to libOSMesa instead of libGL
639 if test "$enable_static" = no; then
640 GLU_MESA_DEPS='-l$(OSMESA_LIB)'
646 # If GLU is available, we can build the xdemos
647 if test "$with_demos" = yes; then
648 PROGRAM_DIRS="$PROGRAM_DIRS xdemos"
651 # If static, empty GLU_LIB_DEPS and add libs for programs to link
652 if test "$enable_static" = no; then
654 GLU_MESA_DEPS='-l$(GL_LIB)'
658 APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++"
663 AC_SUBST(GLU_LIB_DEPS)
664 AC_SUBST(GLU_MESA_DEPS)
667 dnl GLw configuration
670 [AS_HELP_STRING([--disable-glw],
671 [enable Xt/Motif widget library @<:@default=enabled@:>@])],
672 enable_glw="$enableval",
674 dnl Don't build GLw on osmesa
675 if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then
676 AC_MSG_WARN([Disabling GLw since the driver is OSMesa])
679 if test "x$enable_glw" = xyes; then
680 SRC_DIRS="$SRC_DIRS glw"
681 if test "$x11_pkgconfig" = yes; then
682 PKG_CHECK_MODULES(GLW, x11 xt)
683 GLW_LIB_DEPS="$GLW_LIBS"
685 # should check these...
686 GLW_LIB_DEPS="$X_LIBS -lX11 -lXt"
689 # If static, empty GLW_LIB_DEPS and add libs for programs to link
690 if test "$enable_static" = no; then
691 GLW_MESA_DEPS='-l$(GL_LIB)'
693 APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
698 AC_SUBST(GLW_LIB_DEPS)
699 AC_SUBST(GLW_MESA_DEPS)
702 dnl GLUT configuration
704 if test -f "$srcdir/include/GL/glut.h"; then
710 [AS_HELP_STRING([--disable-glut],
711 [enable GLUT library @<:@default=enabled if source available@:>@])],
712 enable_glut="$enableval",
713 enable_glut="$default_glut")
715 dnl Can't build glut if GLU not available
716 if test "x$enable_glu$enable_glut" = xnoyes; then
717 AC_MSG_WARN([Disabling glut since GLU is disabled])
720 dnl Don't build glut on osmesa
721 if test "x$enable_glut" = xyes && test "$mesa_driver" = osmesa; then
722 AC_MSG_WARN([Disabling glut since the driver is OSMesa])
726 if test "x$enable_glut" = xyes; then
727 SRC_DIRS="$SRC_DIRS glut/glx"
729 if test "x$GCC" = xyes; then
730 GLUT_CFLAGS="-fexceptions"
732 if test "$x11_pkgconfig" = yes; then
733 PKG_CHECK_MODULES(GLUT, x11 xmu xi)
734 GLUT_LIB_DEPS="$GLUT_LIBS"
736 # should check these...
737 GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
739 GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
741 # If glut is available, we can build most programs
742 if test "$with_demos" = yes; then
743 PROGRAM_DIRS="$PROGRAM_DIRS demos redbook samples glsl"
746 # If static, empty GLUT_LIB_DEPS and add libs for programs to link
747 if test "$enable_static" = no; then
748 GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)'
750 APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS"
755 AC_SUBST(GLUT_LIB_DEPS)
756 AC_SUBST(GLUT_MESA_DEPS)
757 AC_SUBST(GLUT_CFLAGS)
760 dnl Program library dependencies
761 dnl Only libm is added here if necessary as the libraries should
762 dnl be pulled in by the linker
764 if test "x$APP_LIB_DEPS" = x; then
767 AC_SUBST(APP_LIB_DEPS)
768 AC_SUBST(PROGRAM_DIRS)
770 dnl Arch/platform-specific settings
777 AC_SUBST(ASM_SOURCES)
784 if test "x$enable_asm" = xyes; then
785 ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
786 ASM_SOURCES='$(X86_SOURCES)'
791 if test "x$enable_asm" = xyes; then
792 ASM_FLAGS="-DUSE_X86_64_ASM"
793 ASM_SOURCES='$(X86-64_SOURCES)'
794 ASM_API='$(X86-64_API)'
798 if test "x$enable_asm" = xyes; then
799 ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
800 ASM_SOURCES='$(PPC_SOURCES)'
810 if test "x$enable_asm" = xyes; then
811 ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
812 ASM_SOURCES='$(X86_SOURCES)'
817 if test "x$enable_asm" = xyes; then
818 ASM_FLAGS="-DUSE_X86_64_ASM"
819 ASM_SOURCES='$(X86-64_SOURCES)'
820 ASM_API='$(X86-64_API)'
827 dnl Restore LDFLAGS and CPPFLAGS
828 LDFLAGS="$_SAVE_LDFLAGS"
829 CPPFLAGS="$_SAVE_CPPFLAGS"
831 dnl Substitute the config
832 AC_CONFIG_FILES([configs/autoconf])
835 dnl Replace the configs/current symlink
836 if test -f configs/current || test -L configs/current; then
837 rm -f configs/current
839 ln -s autoconf configs/current
842 dnl Output some configuration info for the user
845 echo " prefix: $prefix"
846 echo " exec_prefix: $exec_prefix"
847 echo " libdir: $libdir"
851 echo " Driver: $mesa_driver"
852 if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then
853 echo " OSMesa: lib$OSMESA_LIB"
857 if test "$mesa_driver" = dri; then
858 # cleanup the drivers var
859 dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
860 echo " DRI drivers: $dri_dirs"
861 echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
866 echo " Shared libs: $enable_shared"
867 echo " Static libs: $enable_static"
868 echo " GLU: $enable_glu"
869 echo " GLw: $enable_glw"
870 echo " glut: $enable_glut"
873 # cleanup the programs var for display
874 program_dirs=`echo $PROGRAM_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
875 if test "x$program_dirs" = x; then
878 echo " Demos: $program_dirs"
882 # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
883 cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
884 $SED 's/^ *//;s/ */ /;s/ *$//'`
885 cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
886 $SED 's/^ *//;s/ */ /;s/ *$//'`
887 defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'`
889 echo " CFLAGS: $cflags"
890 echo " CXXFLAGS: $cxxflags"
891 echo " Macros: $defines"
894 echo " Run 'make' to build Mesa"