summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac123
1 files changed, 113 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index ea2992d38b..4164d377ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,7 +87,7 @@ dnl Compiler macros
DEFINES=""
AC_SUBST([DEFINES])
case "$host_os" in
-*-gnu*)
+linux*|*-gnu*)
DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
;;
solaris*)
@@ -307,6 +307,13 @@ if test "x$enable_asm" = xyes; then
;;
esac
;;
+ sparc*)
+ case "$host_os" in
+ linux*)
+ asm_arch=sparc
+ ;;
+ esac
+ ;;
esac
case "$asm_arch" in
@@ -327,6 +334,12 @@ if test "x$enable_asm" = xyes; then
MESA_ASM_SOURCES='$(PPC_SOURCES)'
AC_MSG_RESULT([yes, ppc])
;;
+ sparc)
+ ASM_FLAGS="-DUSE_SPARC_ASM"
+ MESA_ASM_SOURCES='$(SPARC_SOURCES)'
+ GLAPI_ASM_SOURCES='$(SPARC_API)'
+ AC_MSG_RESULT([yes, sparc])
+ ;;
*)
AC_MSG_RESULT([no, platform not supported])
;;
@@ -382,7 +395,7 @@ default_driver="xlib"
case "$host_os" in
linux*)
case "$host_cpu" in
- i*86|x86_64|powerpc*) default_driver="dri";;
+ i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
esac
;;
*freebsd* | dragonfly*)
@@ -409,14 +422,14 @@ esac
dnl
dnl Driver specific build directories
dnl
-SRC_DIRS="mesa egl"
+SRC_DIRS="mesa egl glew"
GLU_DIRS="sgi"
WINDOW_SYSTEM=""
GALLIUM_DIRS="auxiliary drivers state_trackers"
GALLIUM_WINSYS_DIRS=""
GALLIUM_WINSYS_DRM_DIRS=""
GALLIUM_AUXILIARY_DIRS="draw translate cso_cache pipebuffer tgsi sct rtasm util"
-GALLIUM_DRIVER_DIRS="softpipe failover trace"
+GALLIUM_DRIVERS_DIRS="softpipe failover trace"
GALLIUM_STATE_TRACKERS_DIRS=""
case "$mesa_driver" in
@@ -428,9 +441,6 @@ dri)
DRIVER_DIRS="dri"
WINDOW_SYSTEM="dri"
GALLIUM_WINSYS_DIRS="drm $GALLIUM_WINSYS_DIRS"
- GALLIUM_WINSYS_DRM_DIRS="intel"
- GALLIUM_DRIVER_DIRS="$GALLIUM_DRIVER_DIRS i915simple i965simple"
- GALLIUM_STATE_TRACKERS_DIRS="egl"
;;
osmesa)
DRIVER_DIRS="osmesa"
@@ -443,7 +453,7 @@ AC_SUBST([WINDOW_SYSTEM])
AC_SUBST([GALLIUM_DIRS])
AC_SUBST([GALLIUM_WINSYS_DIRS])
AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
-AC_SUBST([GALLIUM_DRIVER_DIRS])
+AC_SUBST([GALLIUM_DRIVERS_DIRS])
AC_SUBST([GALLIUM_AUXILIARY_DIRS])
AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
AC_SUBST([RADEON_CFLAGS])
@@ -868,6 +878,19 @@ AC_SUBST([OSMESA_PC_REQ])
AC_SUBST([OSMESA_PC_LIB_PRIV])
dnl
+dnl EGL configuration
+dnl
+if test "$x11_pkgconfig" = yes; then
+ PKG_CHECK_MODULES([EGL],[x11])
+ EGL_LIB_DEPS="$EGL_LIBS"
+else
+ # should check these...
+ EGL_LIB_DEPS="$X_LIBS -lX11"
+fi
+EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS $OS_LIBS"
+AC_SUBST([EGL_LIB_DEPS])
+
+dnl
dnl GLU configuration
dnl
AC_ARG_ENABLE([glu],
@@ -1087,6 +1110,86 @@ if test "x$enable_gallium" = xyes; then
SRC_DIRS="$SRC_DIRS gallium gallium/winsys"
fi
+dnl
+dnl Gallium state trackers configuration
+dnl
+AC_ARG_WITH([state-trackers],
+ [AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@],
+ [comma delimited state_trackers list, e.g.
+ "egl,glx" @<:@default=auto@:>@])],
+ [with_state_trackers="$withval"],
+ [with_state_trackers=yes])
+
+case "$with_state_trackers" in
+no)
+ GALLIUM_STATE_TRACKERS_DIRS=""
+ ;;
+yes)
+ # look at what else is built
+ case "$mesa_driver" in
+ dri)
+ GALLIUM_STATE_TRACKERS_DIRS=egl
+ ;;
+ esac
+ ;;
+*)
+ # verify the requested state tracker exist
+ state_trackers=`IFS=', '; echo $with_state_trackers`
+ for tracker in $state_trackers; do
+ test -d "$srcdir/src/gallium/state_trackers/$tracker" || \
+ AC_MSG_ERROR([state tracker '$tracker' doesn't exist])
+ done
+ GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
+ ;;
+esac
+
+AC_ARG_WITH([xorg-driver-dir],
+ [AS_HELP_STRING([--with-xorg-driver-dir=DIR],
+ [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
+ [XORG_DRIVER_INSTALL_DIR="$withval"],
+ [XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
+AC_SUBST([XORG_DRIVER_INSTALL_DIR])
+
+dnl
+dnl Gallium Intel configuration
+dnl
+AC_ARG_ENABLE([gallium-intel],
+ [AS_HELP_STRING([--disable-gallium-intel],
+ [build gallium intel @<:@default=enabled@:>@])],
+ [enable_gallium_intel="$enableval"],
+ [enable_gallium_intel=yes])
+if test "x$enable_gallium_intel" = xyes; then
+ GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel"
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915simple"
+fi
+
+dnl
+dnl Gallium Radeon configuration
+dnl
+AC_ARG_ENABLE([gallium-radeon],
+ [AS_HELP_STRING([--enable-gallium-radeon],
+ [build gallium radeon @<:@default=disabled@:>@])],
+ [enable_gallium_radeon="$enableval"],
+ [enable_gallium_radeon=no])
+if test "x$enable_gallium_radeon" = xyes; then
+ GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS radeon"
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
+fi
+
+dnl
+dnl Gallium Radeon configuration
+dnl
+AC_ARG_ENABLE([gallium-nouveau],
+ [AS_HELP_STRING([--enable-gallium-nouveau],
+ [build gallium nouveau @<:@default=disabled@:>@])],
+ [enable_gallium_nouveau="$enableval"],
+ [enable_gallium_nouveau=no])
+if test "x$enable_gallium_nouveau" = xyes; then
+ GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS nouveau"
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nv04 nv10 nv20 nv30 nv40 nv50"
+fi
+
+
dnl Restore LDFLAGS and CPPFLAGS
LDFLAGS="$_SAVE_LDFLAGS"
CPPFLAGS="$_SAVE_CPPFLAGS"
@@ -1138,9 +1241,9 @@ if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then
echo " Gallium: yes"
echo " Gallium dirs: $GALLIUM_DIRS"
echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
- echo " Winsys drm dirs: $GALLIUM_WINSYS_DRM_DIRS"
+ echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS"
echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS"
- echo " Driver dirs: $GALLIUM_DRIVER_DIRS"
+ echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS"
else
echo " Gallium: no"