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(GMAKE, gmake, [not_found])
30 AC_PATH_PROG(MAKE, make)
31 if test "x$GMAKE" != "xnot_found"; then
34 AC_PATH_PROG(MKDEP, makedepend)
35 AC_PATH_PROG(SED, sed)
37 MKDEP_OPTIONS=-fdepend
38 dnl Ask gcc where it's keeping its secret headers
39 if test "x$GCC" = xyes; then
40 GCC_INCLUDES=`$CC -print-file-name=include`
41 if test "x$GCC_INCLUDES" != x; then
42 MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
45 AC_SUBST(MKDEP_OPTIONS)
47 dnl Check to see if dlopen is in default libraries (like Solaris, which
48 dnl has it in libc), or if libdl is needed to get it.
49 AC_CHECK_FUNC([dlopen], [],
50 AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
52 dnl Make sure the pkg-config macros are defined
53 m4_ifdef([PKG_PROG_PKG_CONFIG],,[
54 AC_MSG_ERROR([The pkg-config autoconf macros are not defined.
55 Did you run 'make configure'?])]
59 dnl LIB_DIR - library basename
60 LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
63 dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later
64 _SAVE_LDFLAGS="$LDFLAGS"
65 AC_ARG_VAR(EXTRA_LIB_PATH,[Extra -L paths for the linker])
66 AC_SUBST(EXTRA_LIB_PATH)
68 dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later
69 _SAVE_CPPFLAGS="$CPPFLAGS"
70 AC_ARG_VAR(X11_INCLUDES,[Extra -I paths for X11 headers])
71 AC_SUBST(X11_INCLUDES)
78 if test "x$GCC" = xyes; then
79 DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
81 DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN"
85 dnl Add flags for gcc and g++
86 if test "x$GCC" = xyes; then
87 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
89 # Work around aliasing bugs - developers should comment this out
90 CFLAGS="$CFLAGS -fno-strict-aliasing"
92 if test "x$GXX" = xyes; then
93 CXXFLAGS="$CXXFLAGS -Wall"
95 # Work around aliasing bugs - developers should comment this out
96 CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
99 dnl These should be unnecessary, but let the user set them if they want
100 AC_ARG_VAR(OPT_FLAGS, [Additional optimization flags for the compiler.
101 Default is to use CFLAGS.])
102 AC_ARG_VAR(ARCH_FLAGS, [Additional architecture specific flags for the
103 compiler. Default is to use CFLAGS.])
108 dnl Hacks to enable 32 or 64 bit build
110 AC_ARG_ENABLE(32-bit,
111 [AS_HELP_STRING([--enable-32-bit],
112 [build 32-bit libraries @<:@default=auto@:>@])],
113 enable_32bit="$enableval",
116 if test "x$enable_32bit" = xyes; then
117 if test "x$GCC" = xyes; then
118 CFLAGS="$CFLAGS -m32"
120 if test "x$GXX" = xyes; then
121 CXXFLAGS="$CXXFLAGS -m32"
124 AC_ARG_ENABLE(64-bit,
125 [AS_HELP_STRING([--enable-64-bit],
126 [build 64-bit libraries @<:@default=auto@:>@])],
127 enable_64bit="$enableval",
130 if test "x$enable_64bit" = xyes; then
131 if test "x$GCC" = xyes; then
132 CFLAGS="$CFLAGS -m64"
134 if test "x$GXX" = xyes; then
135 CXXFLAGS="$CXXFLAGS -m64"
140 dnl shared/static libraries, mimic libtool options
142 AC_ARG_ENABLE(static,
143 [AS_HELP_STRING([--enable-static],
144 [build static libraries @<:@default=disabled@:>@])],
145 enable_static="$enableval",
148 case "x$enable_static" in
150 x ) enable_static=no ;;
152 AC_MSG_ERROR([Static library option '$enable_static' is not a valid])
155 AC_ARG_ENABLE(shared,
156 [AS_HELP_STRING([--disable-shared],
157 [build shared libraries @<:@default=enabled@:>@])],
158 enable_shared="$enableval",
161 case "x$enable_shared" in
163 x ) enable_shared=yes ;;
165 AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid])
169 dnl Can't have static and shared libraries, default to static if user
170 dnl explicitly requested. If both disabled, set to static since shared
171 dnl was explicitly requirested.
172 case "x$enable_static$enable_shared" in
174 AC_MSG_WARN([Can't build static and shared libraries, disabling shared])
178 AC_MSG_WARN([Can't disable both static and shared libraries, enabling static])
186 AC_ARG_VAR(MKLIB_OPTIONS,[Options for the Mesa library script, mklib])
187 if test "$enable_static" = yes; then
188 MKLIB_OPTIONS="$MKLIB_OPTIONS -static"
190 AC_SUBST(MKLIB_OPTIONS)
193 dnl other compiler options
196 [AS_HELP_STRING([--enable-debug],
197 [use debug compiler flags and macros @<:@default=disabled@:>@])],
198 enable_debug="$enableval",
201 if test "x$enable_debug" = xyes; then
202 DEFINES="$DEFINES -DDEBUG"
203 if test "x$GCC" = xyes; then
206 if test "x$GXX" = xyes; then
207 CXXFLAGS="$CXXFLAGS -g"
210 dnl These will be used near the end in the arch specific options
212 [AS_HELP_STRING([--disable-asm],
213 [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
214 enable_asm="$enableval",
221 if test "$enable_static" = yes; then
222 GL_LIB_NAME='lib$(GL_LIB).a'
223 GLU_LIB_NAME='lib$(GLU_LIB).a'
224 GLUT_LIB_NAME='lib$(GLUT_LIB).a'
225 GLW_LIB_NAME='lib$(GLW_LIB).a'
226 OSMESA_LIB_NAME='lib$(OSMESA_LIB).a'
228 GL_LIB_NAME='lib$(GL_LIB).so'
229 GLU_LIB_NAME='lib$(GLU_LIB).so'
230 GLUT_LIB_NAME='lib$(GLUT_LIB).so'
231 GLW_LIB_NAME='lib$(GLW_LIB).so'
232 OSMESA_LIB_NAME='lib$(OSMESA_LIB).so'
234 AC_SUBST(GL_LIB_NAME)
235 AC_SUBST(GLU_LIB_NAME)
236 AC_SUBST(GLUT_LIB_NAME)
237 AC_SUBST(GLW_LIB_NAME)
238 AC_SUBST(OSMESA_LIB_NAME)
241 dnl Driver configuration. Options are xlib, dri and osmesa right now.
242 dnl More later: directfb, fbdev, ...
245 [AS_HELP_STRING([--with-driver=DRIVER],
246 [driver for Mesa: xlib,dri,osmesa @<:@default=xlib@:>@])],
247 mesa_driver="$withval",
249 dnl Check for valid option
250 case "x$mesa_driver" in
254 AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option])
259 dnl Driver specific build directories
264 case "$mesa_driver" in
269 SRC_DIRS="glx/x11 $SRC_DIRS"
279 AC_SUBST(DRIVER_DIRS)
280 AC_SUBST(WINDOW_SYSTEM)
283 dnl User supplied program configuration
285 if test -d "$srcdir/progs/demos"; then
291 [AS_HELP_STRING([--with-demos@<:@=DIRS...@:>@],
292 [optional comma delimited demo directories to build
293 @<:@default=auto if source available@:>@])],
294 with_demos="$withval",
295 with_demos="$default_demos")
296 if test "x$with_demos" = x; then
300 dnl If $with_demos is yes, directories will be added as libs available
302 case "$with_demos" in
305 # If the driver isn't osmesa, we have libGL and can build xdemos
306 if test "$mesa_driver" != osmesa; then
307 PROGRAM_DIRS="xdemos"
311 # verify the requested demos directories exist
312 demos=`IFS=,; echo $with_demos`
313 for demo in $demos; do
314 test -d "$srcdir/progs/$demo" || \
315 AC_MSG_ERROR([Program directory '$demo' doesn't exist])
317 PROGRAM_DIRS="$demos"
322 dnl Find out if X is available. The variables have_x or no_x will be
323 dnl set and used later in the driver setups
325 if test -n "$PKG_CONFIG"; then
326 AC_MSG_CHECKING([pkg-config files for X11 are available])
327 if $PKG_CONFIG --exists x11; then
339 dnl Use the autoconf macro if no pkg-config files
340 if test "$x11_pkgconfig" = no; then
344 dnl We need X for xlib and dri, so bomb now if it's not found
345 case "$mesa_driver" in
347 if test "$no_x" = yes; then
348 AC_MSG_ERROR([X11 development libraries needed for $mesa_driver driver])
354 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux], [Build SELinux-aware Mesa (default: disabled)]), [MESA_SELINUX=$enableval], [MESA_SELINUX=no])
355 if test "x$enable_selinux" = "xyes"; then
356 AC_CHECK_HEADER(selinux/selinux.h,,
357 AC_MSG_ERROR([SELinux headers not found]))
358 AC_CHECK_LIB(selinux,is_selinux_enabled,,
359 AC_MSG_ERROR([SELinux library not found]))
360 SELINUX_LIBS="-lselinux"
361 DEFINES="$DEFINES -DMESA_SELINUX"
365 dnl libGL configuration per driver
367 case "$mesa_driver" in
369 if test "$x11_pkgconfig" = yes; then
370 PKG_CHECK_MODULES(XLIBGL, x11 xext)
371 X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
372 GL_LIB_DEPS="$XLIBGL_LIBS"
374 # should check these...
375 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
376 GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
378 GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
380 # if static, move the external libraries to the programs
381 # and empty the libraries for libGL
382 if test "$enable_static" = yes; then
383 APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS"
388 # DRI must be shared, I think
389 if test "$enable_static" = yes; then
390 AC_MSG_ERROR([Can't use static libraries for DRI drivers])
394 PKG_CHECK_MODULES(LIBDRM, libdrm)
395 PKG_CHECK_MODULES(DRI2PROTO, dri2proto)
397 # find the DRI deps for libGL
398 if test "$x11_pkgconfig" = yes; then
399 PKG_CHECK_MODULES(DRIGL, x11 xext xxf86vm xdamage xfixes)
400 X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
401 GL_LIB_DEPS="$DRIGL_LIBS"
403 # should check these...
404 X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
405 GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
408 # need DRM libs, -lpthread, etc.
409 GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
412 # No libGL for osmesa
416 AC_SUBST(GL_LIB_DEPS)
421 if test "$mesa_driver" = xlib; then
422 DEFINES="$DEFINES -DUSE_XSHM"
428 AC_ARG_ENABLE(glx-tls,
429 [AS_HELP_STRING([--enable-glx-tls],
430 [enable TLS support in GLX @<:@default=disabled@:>@])],
431 GLX_USE_TLS="$enableval",
433 dnl Directory for DRI drivers
434 AC_ARG_WITH(dri-driverdir,
435 [AS_HELP_STRING([--with-dri-driverdir=DIR],
436 [directory for the DRI drivers @<:@/usr/X11R6/lib/modules/dri@:>@])],
437 DRI_DRIVER_INSTALL_DIR="$withval",
438 DRI_DRIVER_INSTALL_DIR='/usr/X11R6/lib/modules/dri')
439 AC_SUBST(DRI_DRIVER_INSTALL_DIR)
440 dnl Direct rendering or just indirect rendering
441 AC_ARG_ENABLE(driglx-direct,
442 [AS_HELP_STRING([--disable-driglx-direct],
443 [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
444 driglx_direct="$enableval",
447 dnl Which drivers to build - default is chosen by platform
448 AC_ARG_WITH(dri-drivers,
449 [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
450 [comma delimited DRI drivers, e.g. "i965,radeon,nouveau" @<:@default=auto@:>@])],
451 with_dri_drivers="$withval",
452 with_dri_drivers=yes)
453 if test "x$with_dri_drivers" = x; then
457 dnl If $with_dri_drivers is yes, directories will be added through
460 case "$with_dri_drivers" in
463 # verify the requested driver directories exist
464 dri_drivers=`IFS=,; echo $with_dri_drivers`
465 for driver in $dri_drivers; do
466 test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
467 AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist])
469 DRI_DIRS="$dri_drivers"
473 dnl Just default to no EGL for now
477 dnl Set DRI_DIRS, DEFINES and LIB_DEPS
478 if test "$mesa_driver" = dri; then
480 if test "x$GLX_USE_TLS" = xyes; then
481 DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
484 if test "x$USING_EGL" = x1; then
488 # Platform specific settings and drivers to build
491 DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
492 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS"
493 if test "x$driglx_direct" = xyes; then
494 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
499 # ffb, gamma, and sis are missing because they have not be
500 # converted to use the new interface. i810 are missing
501 # because there is no x86-64 system where they could *ever*
503 if test "x$DRI_DIRS" = x; then
504 DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \
505 savage tdfx unichrome"
509 # Build only the drivers for cards that exist on PowerPC.
510 # At some point MGA will be added, but not yet.
511 if test "x$DRI_DIRS" = x; then
512 DRI_DIRS="mach64 r128 r200 r300 radeon tdfx"
518 DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
519 DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
520 DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
521 if test "x$driglx_direct" = xyes; then
522 DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
524 if test "x$GXX" = xyes; then
525 CXXFLAGS="$CXXFLAGS -ansi -pedantic"
528 # ffb and gamma are missing because they have not been converted
529 # to use the new interface.
530 if test "x$DRI_DIRS" = x; then
531 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
532 unichrome savage sis"
538 if test "x$DRI_DIRS" = x; then
539 DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
540 savage sis tdfx trident unichrome ffb"
543 DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
548 AC_ARG_WITH(expat, AS_HELP_STRING([--with-expat=DIR],
549 [expat install directory]),[
550 EXPAT_INCLUDES="-I$withval/include"
551 CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
552 LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
553 EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
555 AC_CHECK_HEADER(expat.h,,AC_MSG_ERROR([Expat required for DRI.]))
556 AC_CHECK_LIB(expat, XML_ParserCreate,,
557 AC_MSG_ERROR([Expat required for DRI.]))
559 # put all the necessary libs together
560 DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
563 AC_SUBST(EXPAT_INCLUDES)
564 AC_SUBST(DRI_LIB_DEPS)
567 dnl OSMesa configuration
569 if test "$mesa_driver" = xlib; then
570 default_gl_osmesa=yes
574 AC_ARG_ENABLE(gl-osmesa,
575 [AS_HELP_STRING([--enable-gl-osmesa],
576 [enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])],
577 gl_osmesa="$enableval",
578 gl_osmesa="$default_gl_osmesa")
579 if test "x$gl_osmesa" = xyes; then
580 if test "$mesa_driver" = osmesa; then
581 AC_MSG_ERROR([libGL is not available for OSMesa driver])
583 DRIVER_DIRS="$DRIVER_DIRS osmesa"
587 dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...)
588 AC_ARG_WITH(osmesa-bits,
589 [AS_HELP_STRING([--with-osmesa-bits=BITS],
590 [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])],
591 osmesa_bits="$withval",
593 if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then
594 AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver])
597 case "x$osmesa_bits" in
602 OSMESA_LIB="OSMesa$osmesa_bits"
603 DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
606 AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option])
611 case "$mesa_driver" in
613 # only link librararies with osmesa if shared
614 if test "$enable_static" = no; then
615 OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS"
622 # Link OSMesa to libGL otherwise
624 # only link librararies with osmesa if shared
625 if test "$enable_static" = no; then
626 OSMESA_MESA_DEPS='-l$(GL_LIB)'
632 AC_SUBST(OSMESA_LIB_DEPS)
633 AC_SUBST(OSMESA_MESA_DEPS)
636 dnl GLU configuration
639 [AS_HELP_STRING([--disable-glu],
640 [enable OpenGL Utility library @<:@default=enabled@:>@])],
641 enable_glu="$enableval",
643 if test "x$enable_glu" = xyes; then
644 SRC_DIRS="$SRC_DIRS glu"
646 case "$mesa_driver" in
648 # If GLU is available and we have libOSMesa (not 16 or 32),
649 # we can build the osdemos
650 if test "$with_demos" = yes && test "$osmesa_bits" = 8; then
651 PROGRAM_DIRS="$PROGRAM_DIRS osdemos"
654 # Link libGLU to libOSMesa instead of libGL
656 if test "$enable_static" = no; then
657 GLU_MESA_DEPS='-l$(OSMESA_LIB)'
663 # If static, empty GLU_LIB_DEPS and add libs for programs to link
664 if test "$enable_static" = no; then
666 GLU_MESA_DEPS='-l$(GL_LIB)'
670 APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++"
675 AC_SUBST(GLU_LIB_DEPS)
676 AC_SUBST(GLU_MESA_DEPS)
679 dnl GLw configuration
682 [AS_HELP_STRING([--disable-glw],
683 [enable Xt/Motif widget library @<:@default=enabled@:>@])],
684 enable_glw="$enableval",
686 dnl Don't build GLw on osmesa
687 if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then
688 AC_MSG_WARN([Disabling GLw since the driver is OSMesa])
691 if test "x$enable_glw" = xyes; then
692 SRC_DIRS="$SRC_DIRS glw"
693 if test "$x11_pkgconfig" = yes; then
694 PKG_CHECK_MODULES(GLW, x11 xt)
695 GLW_LIB_DEPS="$GLW_LIBS"
697 # should check these...
698 GLW_LIB_DEPS="$X_LIBS -lX11 -lXt"
701 # If static, empty GLW_LIB_DEPS and add libs for programs to link
702 if test "$enable_static" = no; then
703 GLW_MESA_DEPS='-l$(GL_LIB)'
705 APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
710 AC_SUBST(GLW_LIB_DEPS)
711 AC_SUBST(GLW_MESA_DEPS)
714 dnl GLUT configuration
716 if test -f "$srcdir/include/GL/glut.h"; then
722 [AS_HELP_STRING([--disable-glut],
723 [enable GLUT library @<:@default=enabled if source available@:>@])],
724 enable_glut="$enableval",
725 enable_glut="$default_glut")
727 dnl Can't build glut if GLU not available
728 if test "x$enable_glu$enable_glut" = xnoyes; then
729 AC_MSG_WARN([Disabling glut since GLU is disabled])
732 dnl Don't build glut on osmesa
733 if test "x$enable_glut" = xyes && test "$mesa_driver" = osmesa; then
734 AC_MSG_WARN([Disabling glut since the driver is OSMesa])
738 if test "x$enable_glut" = xyes; then
739 SRC_DIRS="$SRC_DIRS glut/glx"
741 if test "x$GCC" = xyes; then
742 GLUT_CFLAGS="-fexceptions"
744 if test "$x11_pkgconfig" = yes; then
745 PKG_CHECK_MODULES(GLUT, x11 xmu xi)
746 GLUT_LIB_DEPS="$GLUT_LIBS"
748 # should check these...
749 GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
751 GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
753 # If glut is available, we can build most programs
754 if test "$with_demos" = yes; then
755 PROGRAM_DIRS="$PROGRAM_DIRS demos redbook samples glsl"
758 # If static, empty GLUT_LIB_DEPS and add libs for programs to link
759 if test "$enable_static" = no; then
760 GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)'
762 APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS"
767 AC_SUBST(GLUT_LIB_DEPS)
768 AC_SUBST(GLUT_MESA_DEPS)
769 AC_SUBST(GLUT_CFLAGS)
772 dnl Program library dependencies
773 dnl Only libm is added here if necessary as the libraries should
774 dnl be pulled in by the linker
776 if test "x$APP_LIB_DEPS" = x; then
779 AC_SUBST(APP_LIB_DEPS)
780 AC_SUBST(PROGRAM_DIRS)
782 dnl Arch/platform-specific settings
789 AC_SUBST(ASM_SOURCES)
796 if test "x$enable_asm" = xyes; then
797 ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
798 ASM_SOURCES='$(X86_SOURCES)'
803 if test "x$enable_asm" = xyes; then
804 ASM_FLAGS="-DUSE_X86_64_ASM"
805 ASM_SOURCES='$(X86-64_SOURCES)'
806 ASM_API='$(X86-64_API)'
810 if test "x$enable_asm" = xyes; then
811 ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
812 ASM_SOURCES='$(PPC_SOURCES)'
822 if test "x$enable_asm" = xyes; then
823 ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
824 ASM_SOURCES='$(X86_SOURCES)'
829 if test "x$enable_asm" = xyes; then
830 ASM_FLAGS="-DUSE_X86_64_ASM"
831 ASM_SOURCES='$(X86-64_SOURCES)'
832 ASM_API='$(X86-64_API)'
839 dnl Restore LDFLAGS and CPPFLAGS
840 LDFLAGS="$_SAVE_LDFLAGS"
841 CPPFLAGS="$_SAVE_CPPFLAGS"
843 dnl Substitute the config
844 AC_CONFIG_FILES([configs/autoconf])
847 dnl Replace the configs/current symlink
848 if test -f configs/current || test -L configs/current; then
849 rm -f configs/current
851 ln -s autoconf configs/current
854 dnl Output some configuration info for the user
857 echo " prefix: $prefix"
858 echo " exec_prefix: $exec_prefix"
859 echo " libdir: $libdir"
863 echo " Driver: $mesa_driver"
864 if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then
865 echo " OSMesa: lib$OSMESA_LIB"
869 if test "$mesa_driver" = dri; then
870 # cleanup the drivers var
871 dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
872 echo " DRI drivers: $dri_dirs"
873 echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
878 echo " Shared libs: $enable_shared"
879 echo " Static libs: $enable_static"
880 echo " GLU: $enable_glu"
881 echo " GLw: $enable_glw"
882 echo " glut: $enable_glut"
885 # cleanup the programs var for display
886 program_dirs=`echo $PROGRAM_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
887 if test "x$program_dirs" = x; then
890 echo " Demos: $program_dirs"
894 # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
895 cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
896 $SED 's/^ *//;s/ */ /;s/ *$//'`
897 cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
898 $SED 's/^ *//;s/ */ /;s/ *$//'`
899 defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'`
901 echo " CFLAGS: $cflags"
902 echo " CXXFLAGS: $cxxflags"
903 echo " Macros: $defines"
906 echo " Run 'make' to build Mesa"