LT_PREREQ([2.2])
LT_INIT([disable-static])
-dnl Save user CFLAGS and CXXFLAGS so one can override the default ones
-USER_CFLAGS="$CFLAGS"
-USER_CXXFLAGS="$CXXFLAGS"
-
dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.24
-LIBDRM_RADEON_REQUIRED=2.4.31
-LIBDRM_INTEL_REQUIRED=2.4.34
+LIBDRM_RADEON_REQUIRED=2.4.38
+LIBDRM_INTEL_REQUIRED=2.4.38
LIBDRM_NVVIEUX_REQUIRED=2.4.33
LIBDRM_NOUVEAU_REQUIRED=2.4.33
DRI2PROTO_REQUIRED=2.6
AC_PROG_YACC
AC_PATH_PROG([YACC_INST], $YACC)
-if test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.y"; then
+if test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.c"; then
if test -z "$YACC_INST"; then
AC_MSG_ERROR([yacc not found - unable to compile glcpp-parse.y])
fi
LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
AC_SUBST([LIB_DIR])
-dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later
+dnl Cache LDFLAGS and CPPFLAGS so we can add to them and restore later
_SAVE_LDFLAGS="$LDFLAGS"
-AC_ARG_VAR([EXTRA_LIB_PATH],[Extra -L paths for the linker])
-AC_SUBST([EXTRA_LIB_PATH])
-
-dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later
_SAVE_CPPFLAGS="$CPPFLAGS"
-AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11 headers])
-AC_SUBST([X11_INCLUDES])
dnl Compiler macros
DEFINES=""
AC_SUBST([VISIBILITY_CFLAGS])
AC_SUBST([VISIBILITY_CXXFLAGS])
-dnl These should be unnecessary, but let the user set them if they want
-AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler.
- Default is to use CFLAGS.])
-AC_ARG_VAR([ARCH_FLAGS], [Additional architecture specific flags for the
- compiler. Default is to use CFLAGS.])
-AC_SUBST([OPT_FLAGS])
-AC_SUBST([ARCH_FLAGS])
-
dnl
dnl Hacks to enable 32 or 64 bit build
dnl
if test "x$enable_32bit" = xyes; then
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -m32"
- ARCH_FLAGS="$ARCH_FLAGS -m32"
CCASFLAGS="$CCASFLAGS -m32"
fi
if test "x$GXX" = xyes; then
dnl was explicitly requested.
case "x$enable_static$enable_shared" in
xyesyes )
- AC_MSG_WARN([Can't build static and shared libraries, disabling shared])
+ AC_MSG_WARN([Cannot build static and shared libraries, disabling shared])
enable_shared=no
;;
xnono )
- AC_MSG_WARN([Can't disable both static and shared libraries, enabling static])
+ AC_MSG_WARN([Cannot disable both static and shared libraries, enabling static])
enable_static=yes
;;
esac
+AM_CONDITIONAL(BUILD_SHARED, test "x$enable_shared" = xyes)
+
dnl
dnl mklib options
dnl
AC_SUBST([GL_LIB])
AC_SUBST([GLU_LIB])
AC_SUBST([OSMESA_LIB])
-AM_CONDITIONAL(HAVE_MANGLED_GL, test "x${enable_mangling}" = "xyes")
dnl
dnl potentially-infringing-but-nobody-knows-for-sure stuff
GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
-OSMESA_LIB_GLOB=${LIB_PREFIX_GLOB}'$(OSMESA_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
AC_SUBST([GL_LIB_GLOB])
AC_SUBST([GLU_LIB_GLOB])
-AC_SUBST([OSMESA_LIB_GLOB])
AC_SUBST([EGL_LIB_GLOB])
AC_SUBST([GLESv1_CM_LIB_GLOB])
AC_SUBST([GLESv2_LIB_GLOB])
)
asm_arch=""
MESA_ASM_FILES=""
-GLAPI_ASM_SOURCES=""
AC_MSG_CHECKING([whether to enable assembly])
test "x$enable_asm" = xno && AC_MSG_RESULT([no])
# disable if cross compiling on x86/x86_64 since we must run gen_matypes
;;
esac
;;
- powerpc)
- case "$host_os" in
- linux*)
- asm_arch=ppc
- ;;
- esac
- ;;
sparc*)
case "$host_os" in
linux*)
x86)
DEFINES="$DEFINES -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
MESA_ASM_FILES='$(X86_FILES)'
- GLAPI_ASM_SOURCES='$(X86_API)'
AC_MSG_RESULT([yes, x86])
;;
x86_64)
DEFINES="$DEFINES -DUSE_X86_64_ASM"
MESA_ASM_FILES='$(X86_64_FILES)'
- GLAPI_ASM_SOURCES='$(X86-64_API)'
AC_MSG_RESULT([yes, x86_64])
;;
sparc)
DEFINES="$DEFINES -DUSE_SPARC_ASM"
MESA_ASM_FILES='$(SPARC_FILES)'
- GLAPI_ASM_SOURCES='$(SPARC_API)'
AC_MSG_RESULT([yes, sparc])
;;
*)
esac
fi
AC_SUBST([MESA_ASM_FILES])
-AC_SUBST([GLAPI_ASM_SOURCES])
dnl PIC code macro
MESA_PIC_FLAGS
dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
-AC_CHECK_FUNC([dlopen], [],
- [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
+AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
AC_SUBST([DLOPEN_LIBS])
dnl See if posix_memalign is available
AC_ARG_ENABLE([dri],
[AS_HELP_STRING([--enable-dri],
- [enable DRI modules @<:@default=auto@:>@])],
+ [enable DRI modules @<:@default=enabled@:>@])],
[enable_dri="$enableval"],
- [enable_dri=auto])
+ [enable_dri=yes])
AC_ARG_ENABLE([glx],
[AS_HELP_STRING([--enable-glx],
- [enable GLX library @<:@default=auto@:>@])],
+ [enable GLX library @<:@default=enabled@:>@])],
[enable_glx="$enableval"],
- [enable_glx=auto])
+ [enable_glx=yes])
AC_ARG_ENABLE([osmesa],
[AS_HELP_STRING([--enable-osmesa],
- [enable OSMesa library @<:@default=auto@:>@])],
+ [enable OSMesa library @<:@default=disabled@:>@])],
[enable_osmesa="$enableval"],
- [enable_osmesa=auto])
+ [enable_osmesa=no])
AC_ARG_ENABLE([egl],
[AS_HELP_STRING([--disable-egl],
[disable EGL library @<:@default=enabled@:>@])],
[enable_opencl=no])
AC_ARG_ENABLE([xlib_glx],
[AS_HELP_STRING([--enable-xlib-glx],
- [make GLX library Xlib-based instead of DRI-based @<:@default=disable@:>@])],
+ [make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
[enable_xlib_glx="$enableval"],
- [enable_xlib_glx=auto])
+ [enable_xlib_glx=no])
AC_ARG_ENABLE([gallium_egl],
[AS_HELP_STRING([--enable-gallium-egl],
[enable optional EGL state tracker (not required
fi
AC_SUBST([API_DEFINES])
+if test "x$enable_glx" = xno; then
+ AC_MSG_WARN([GLX disabled, disabling Xlib-GLX])
+ enable_xlib_glx=no
+fi
+
+if test "x$enable_dri$enable_xlib_glx" = xyesyes; then
+ AC_MSG_ERROR([DRI and Xlib-GLX cannot be built together])
+fi
+
+# Disable GLX if DRI and Xlib-GLX are not enabled
+if test "x$enable_glx" = xyes -a \
+ "x$enable_dri" = xno -a \
+ "x$enable_xlib_glx" = xno; then
+ AC_MSG_WARN([Neither DRI nor Xlib-GLX enabled, disabling GLX])
+ enable_glx=no
+fi
+
+AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes)
+AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
+ "x$enable_osmesa" = xyes)
+
AC_ARG_ENABLE([shared-glapi],
[AS_HELP_STRING([--enable-shared-glapi],
- [EXPERIMENTAL. Enable shared glapi for OpenGL @<:@default=no@:>@])],
+ [Enable shared glapi for OpenGL @<:@default=yes@:>@])],
[enable_shared_glapi="$enableval"],
- [enable_shared_glapi=no])
+ [enable_shared_glapi="$enable_dri"])
+
+# Shared GLAPI is only useful for DRI
+if test "x$enable_dri" = xno; then
+ AC_MSG_NOTICE([Shared GLAPI is only useful for DRI, disabling])
+ enable_shared_glapi=no
+fi
+# TODO: Get rid of SHARED_GLAPI variable
SHARED_GLAPI="0"
if test "x$enable_shared_glapi" = xyes; then
SHARED_GLAPI="1"
# libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use
# the remap table)
DEFINES="$DEFINES -DIN_DRI_DRIVER"
- SRC_DIRS="$SRC_DIRS mapi/shared-glapi"
+ CORE_DIRS="mapi/shared-glapi"
fi
AC_SUBST([SHARED_GLAPI])
-AM_CONDITIONAL(HAVE_SHARED_GLAPI, test $SHARED_GLAPI = 1)
-
-dnl
-dnl Driver configuration. Options are xlib, dri and osmesa right now.
-dnl More later: fbdev, ...
-dnl
-default_driver="xlib"
-
-case "$host_os" in
-linux*)
- case "$host_cpu" in
- i*86|x86_64|powerpc*|sparc*|ia64*) default_driver="dri";;
- esac
- ;;
-*freebsd* | dragonfly* | *netbsd*)
- case "$host_cpu" in
- i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
- esac
- ;;
-esac
-
-if test "x$enable_opengl" = xno; then
- default_driver="no"
-fi
-
-AC_ARG_WITH([driver],
- [AS_HELP_STRING([--with-driver=DRIVER], [DEPRECATED])],
- [mesa_driver="$withval"],
- [mesa_driver=auto])
-dnl Check for valid option
-case "x$mesa_driver" in
-xxlib|xdri|xosmesa|xno)
- if test "x$enable_dri" != xauto -o \
- "x$enable_glx" != xauto -o \
- "x$enable_osmesa" != xauto -o \
- "x$enable_xlib_glx" != xauto; then
- AC_MSG_ERROR([--with-driver=$mesa_driver is deprecated])
- fi
- ;;
-xauto)
- mesa_driver="$default_driver"
- ;;
-*)
- AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option])
- ;;
-esac
-
-# map $mesa_driver to APIs
-if test "x$enable_dri" = xauto; then
- case "x$mesa_driver" in
- xdri) enable_dri=yes ;;
- *) enable_dri=no ;;
- esac
-fi
-
-if test "x$enable_glx" = xauto; then
- case "x$mesa_driver" in
- xdri|xxlib) enable_glx=yes ;;
- *) enable_glx=no ;;
- esac
-fi
-
-if test "x$enable_osmesa" = xauto; then
- case "x$mesa_driver" in
- xxlib|xosmesa) enable_osmesa=yes ;;
- *) enable_osmesa=no ;;
- esac
-fi
-
-if test "x$enable_xlib_glx" = xauto; then
- case "x$mesa_driver" in
- xxlib) enable_xlib_glx=yes ;;
- *) enable_xlib_glx=no ;;
- esac
-fi
-
-if test "x$enable_glx" = xno; then
- enable_xlib_glx=no
-fi
-
-AM_CONDITIONAL(HAVE_DRI, test x"$enable_dri" = xyes)
+AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes)
dnl
dnl Driver specific build directories
dnl
-
-dnl this variable will be prepended to SRC_DIRS and is not exported
-CORE_DIRS=""
-
SRC_DIRS="gtest"
-GLU_DIRS="sgi"
GALLIUM_DIRS="auxiliary drivers state_trackers"
GALLIUM_TARGET_DIRS=""
GALLIUM_WINSYS_DIRS="sw"
GALLIUM_DRIVERS_DIRS="galahad trace rbug noop identity"
GALLIUM_STATE_TRACKERS_DIRS=""
-# build shared-glapi if enabled for OpenGL or if OpenGL ES is enabled
-case "x$enable_shared_glapi$enable_gles1$enable_gles2" in
-x*yes*)
- CORE_DIRS="$CORE_DIRS mapi/shared-glapi"
- ;;
-esac
-
# build glapi if OpenGL is enabled
if test "x$enable_opengl" = xyes; then
CORE_DIRS="$CORE_DIRS mapi/glapi"
fi
AC_SUBST([SRC_DIRS])
-AC_SUBST([GLU_DIRS])
AC_SUBST([DRIVER_DIRS])
AC_SUBST([GALLIUM_DIRS])
AC_SUBST([GALLIUM_TARGET_DIRS])
if test "x$enable_dri" = xyes; then
# DRI must be shared, I think
if test "$enable_static" = yes; then
- AC_MSG_ERROR([Can't use static libraries for DRI drivers])
+ AC_MSG_ERROR([Cannot use static libraries for DRI drivers])
fi
# not a hard requirement as swrast does not depend on it
fi
fi
-dnl
-dnl Find out if X is available. The variable have_x is set if libX11 is
-dnl found to mimic AC_PATH_XTRA.
-dnl
-if test -n "$PKG_CONFIG"; then
- AC_MSG_CHECKING([pkg-config files for X11 are available])
- PKG_CHECK_EXISTS([x11],[
- x11_pkgconfig=yes
- have_x=yes
- ],[
- x11_pkgconfig=no
- ])
- AC_MSG_RESULT([$x11_pkgconfig])
-else
- x11_pkgconfig=no
-fi
-dnl Use the autoconf macro if no pkg-config files
-if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES([X11], [x11])
-else
- AC_PATH_XTRA
- test -z "$X11_CFLAGS" && X11_CFLAGS="$X_CFLAGS"
- test -z "$X11_LIBS" && X11_LIBS="$X_LIBS -lX11"
- AC_SUBST([X11_CFLAGS])
- AC_SUBST([X11_LIBS])
-fi
+dnl Find out if X is available.
+PKG_CHECK_MODULES([X11], [x11])
dnl Try to tell the user that the --x-* options are only used when
dnl pkg-config is not available. This must be right after AC_PATH_XTRA.
case "x$enable_glx$enable_xlib_glx" in
xyesyes)
# Xlib-based GLX
- if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES([XLIBGL], [x11 xext])
- GL_PC_REQ_PRIV="x11 xext"
- X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
- GL_LIB_DEPS="$XLIBGL_LIBS"
- else
- # should check these...
- X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
- GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
- GL_PC_LIB_PRIV="$GL_LIB_DEPS"
- GL_PC_CFLAGS="$X11_INCLUDES"
- fi
+ PKG_CHECK_MODULES([XLIBGL], [x11 xext])
+ GL_PC_REQ_PRIV="x11 xext"
+ X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
+ GL_LIB_DEPS="$XLIBGL_LIBS"
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $DLOPEN_LIBS"
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
;;
fi
# find the DRI deps for libGL
- if test "$x11_pkgconfig" = yes; then
- dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx"
+ dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1"
- # add xf86vidmode if available
- PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no)
- if test "$HAVE_XF86VIDMODE" = yes ; then
- dri_modules="$dri_modules xxf86vm"
- fi
-
- PKG_CHECK_MODULES([DRIGL], [$dri_modules])
- GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
- X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
- GL_LIB_DEPS="$DRIGL_LIBS"
- else
- # should check these...
- X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
- if test "x$HAVE_XF86VIDMODE" == xyes; then
- GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
- else
- GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXdamage -lXfixes"
- fi
- GL_PC_LIB_PRIV="$GL_LIB_DEPS"
- GL_PC_CFLAGS="$X11_INCLUDES"
-
- # XCB can only be used from pkg-config
- PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx])
- GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx"
- X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS"
- GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS"
+ # add xf86vidmode if available
+ PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no)
+ if test "$HAVE_XF86VIDMODE" = yes ; then
+ dri_modules="$dri_modules xxf86vm"
fi
- # Check to see if the xcb-glx library is new enough to support
- # GLX_ARB_create_context. This bit of hackery is necessary until XCB 1.8
- # is released.
- save_CPPFLAGS="$CPPFLAGS"
- save_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS $X11_INCLUDES"
- LDFLAGS="$LDFLAGS $GL_LIB_DEPS"
- AC_CHECK_LIB(xcb-glx, xcb_glx_create_context_attribs_arb_checked,
- [HAVE_XCB_GLX_CREATE_CONTEXT=yes],
- [HAVE_XCB_GLX_CREATE_CONTEXT=no])
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
-
- if test x$HAVE_XCB_GLX_CREATE_CONTEXT = xyes; then
- X11_INCLUDES="$X11_INCLUDES -DHAVE_XCB_GLX_CREATE_CONTEXT"
- fi
+ PKG_CHECK_MODULES([DRIGL], [$dri_modules])
+ GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
+ X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
+ GL_LIB_DEPS="$DRIGL_LIBS"
# need DRM libs, -lpthread, etc.
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
# This is outside the case (above) so that it is invoked even for non-GLX
# builds.
-AM_CONDITIONAL(HAVE_XCB_GLX_CREATE_CONTEXT,
- test x$HAVE_XCB_GLX_CREATE_CONTEXT = xyes)
AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes)
GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
AC_SUBST([GLAPI_LIB_DEPS])
-dnl Setup default DRI CFLAGS
-DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
-MESA_MODULES='$(TOP)/src/mesa/libmesa.a'
-
-if test "x$enable_dri" = xyes && test "x$driglx_direct" = xyes ; then
- DRI_LIB_DEPS="-L\$(TOP)/\$(LIB_DIR) -ldricore$VERSION"
- MESA_MODULES="\$(TOP)/\$(LIB_DIR)/libdricore$VERSION.so"
- HAVE_DRICORE=yes
-fi
-AM_CONDITIONAL(HAVE_DRICORE, test x$HAVE_DRICORE = xyes)
-AC_SUBST([MESA_MODULES])
+DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la"
+GALLIUM_DRI_LIB_DEPS="\$(TOP)/\$(LIB_DIR)/libdricore${VERSION}.so"
AC_SUBST([HAVE_XF86VIDMODE])
dri_drivers=`IFS=', '; echo $with_dri_drivers`
for driver in $dri_drivers; do
test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
- AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist])
+ AC_MSG_ERROR([DRI driver directory '$driver' does not exist])
done
DRI_DIRS="$dri_drivers"
if test -n "$DRI_DIRS" -a "x$enable_opengl" != xyes; then
# put all the necessary libs together
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
+ GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
fi
AC_SUBST([DRI_DIRS])
AC_SUBST([EXPAT_INCLUDES])
AC_SUBST([DRI_LIB_DEPS])
+AC_SUBST([GALLIUM_DRI_LIB_DEPS])
case $DRI_DIRS in
*i915*|*i965*)
OSMESA_MESA_DEPS=""
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
fi
+
AC_SUBST([OSMESA_LIB_DEPS])
AC_SUBST([OSMESA_MESA_DEPS])
AC_SUBST([OSMESA_PC_REQ])
if test "x$enable_dri" = xyes; then
GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
- if test "$SHARED_GLAPI" -eq 0; then
+ if test "x$enable_shared_glapi" = xno; then
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
fi
+ PKG_CHECK_MODULES([LIBKMS], [libkms], [],
+ AC_MSG_ERROR([gbm needs libkms]))
fi
fi
GBM_PC_REQ_PRIV="libudev"
CORE_DIRS="$CORE_DIRS mapi/vgapi"
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
HAVE_ST_VEGA=yes
+ VG_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
+ AC_SUBST([VG_PC_LIB_PRIV])
fi
dnl
if test "x$with_gallium_drivers" != x; then
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
fi
+AM_CONDITIONAL(HAVE_GALLIUM, test "x$with_gallium_drivers" != x)
AC_SUBST([LLVM_BINDIR])
AC_SUBST([LLVM_CFLAGS])
[AC_MSG_ERROR([cannot find libwayland-client])])
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
- m4_ifdef([WAYLAND_SCANNER_RULES],
- [WAYLAND_SCANNER_RULES(['$(top_srcdir)/src/egl/wayland/wayland-drm/protocol'])])
+ WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
+ [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
;;
x11)
[with_llvm_shared_libs=yes],
[with_llvm_shared_libs=no])
+AC_ARG_WITH([llvm-prefix],
+ [AS_HELP_STRING([--with-llvm-prefix],
+ [Prefix for LLVM installations in non-standard locations])],
+ [llvm_prefix="$withval"],
+ [llvm_prefix=""])
+
+
if test "x$with_gallium_drivers" = x; then
enable_gallium_llvm=no
fi
esac
fi
if test "x$enable_gallium_llvm" = xyes; then
- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
+ if test "x$llvm_prefix" != x; then
+ AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
+ else
+ AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
+ fi
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`"
else
- LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter`"
+ LLVM_COMPONENTS="engine bitwriter"
+ if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
+ fi
if test "x$enable_opencl" = xyes; then
- LLVM_LIBS="${LLVM_LIBS} `llvm-config --libs ipo linker instrumentation`"
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
fi
+ LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
USE_R600_LLVM_COMPILER=yes;
fi
if test "x$enable_opencl" = xyes -a "x$with_llvm_shared_libs" = xno; then
- LLVM_LIBS="${LLVM_LIBS} `llvm-config --libs bitreader asmparser`"
+ LLVM_LIBS="${LLVM_LIBS} `$LLVM_CONFIG --libs bitreader asmparser`"
fi
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" "va-r600"
;;
AC_MSG_ERROR([LLVM 3.1 is required to build the radeonsi driver.])
fi
NEED_RADEON_GALLIUM=yes;
- gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi"
+ gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" ""
;;
xnouveau)
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
if test "x$enable_gallium_drm_loader" = xyes; then
GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_DRM"
+ PKG_CHECK_MODULES([GALLIUM_PIPE_LOADER_XCB], [xcb xcb-dri2],
+ pipe_loader_have_xcb=yes, pipe_loader_have_xcb=no)
+ if test "x$pipe_loader_have_xcb" = xyes; then
+ GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DPIPE_LOADER_HAVE_XCB"
+ GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS $GALLIUM_PIPE_LOADER_XCB_LIBS $LIBDRM_LIBS"
+ fi
fi
AC_SUBST([GALLIUM_PIPE_LOADER_DEFINES])
AC_SUBST([GALLIUM_MAKE_DIRS])
AM_CONDITIONAL(HAVE_X11_DRIVER, echo "$DRIVER_DIRS" | grep 'x11' >/dev/null 2>&1)
-AM_CONDITIONAL(HAVE_DRI_DRIVER, echo "$DRIVER_DIRS" | grep 'dri' >/dev/null 2>&1)
-AM_CONDITIONAL(HAVE_OSMESA_DRIVER, echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_SPARC_ASM, echo "$DEFINES" | grep 'SPARC_ASM' >/dev/null 2>&1)
+# To pass as an argument to libtool's -version-number flag
+VERSION_NUMBER=`echo "$VERSION" | $SED 's/\./:/g'`
+AC_SUBST([VERSION_NUMBER])
+
dnl prepend CORE_DIRS to SRC_DIRS
SRC_DIRS="$CORE_DIRS $SRC_DIRS"
dnl Substitute the config
AC_CONFIG_FILES([configs/current
Makefile
- src/Makefile
- src/gallium/Makefile
- src/gallium/auxiliary/pipe-loader/Makefile
- src/gallium/state_trackers/clover/Makefile
- src/gallium/drivers/Makefile
- src/gallium/drivers/r300/Makefile
- src/gallium/drivers/r600/Makefile
- src/gallium/targets/opencl/Makefile
- src/gbm/Makefile
- src/gbm/main/gbm.pc
+ src/egl/Makefile
src/egl/drivers/Makefile
src/egl/drivers/dri2/Makefile
src/egl/drivers/glx/Makefile
- src/egl/Makefile
src/egl/main/Makefile
src/egl/main/egl.pc
src/egl/wayland/Makefile
+ src/egl/wayland/wayland-drm/Makefile
src/egl/wayland/wayland-egl/Makefile
src/egl/wayland/wayland-egl/wayland-egl.pc
- src/egl/wayland/wayland-drm/Makefile
+ src/gallium/Makefile
+ src/gallium/auxiliary/pipe-loader/Makefile
+ src/gallium/drivers/Makefile
+ src/gallium/drivers/r300/Makefile
+ src/gallium/drivers/r600/Makefile
+ src/gallium/state_trackers/clover/Makefile
+ src/gallium/targets/opencl/Makefile
+ src/gbm/Makefile
+ src/gbm/main/gbm.pc
+ src/glsl/Makefile
+ src/glsl/glcpp/Makefile
src/glsl/tests/Makefile
src/glx/Makefile
src/glx/tests/Makefile
+ src/gtest/Makefile
+ src/Makefile
+ src/mapi/es1api/Makefile
+ src/mapi/es1api/glesv1_cm.pc
+ src/mapi/es2api/Makefile
+ src/mapi/es2api/glesv2.pc
+ src/mapi/glapi/Makefile
src/mapi/glapi/gen/Makefile
- src/mapi/shared-glapi/Makefile
src/mapi/glapi/tests/Makefile
- src/gtest/Makefile
+ src/mapi/shared-glapi/Makefile
+ src/mapi/shared-glapi/tests/Makefile
+ src/mapi/vgapi/Makefile
+ src/mapi/vgapi/vg.pc
src/mesa/Makefile
- src/mesa/libdricore/Makefile
- src/mesa/main/tests/Makefile
- src/mesa/x86/Makefile
- src/mesa/x86-64/Makefile
+ src/mesa/gl.pc
src/mesa/drivers/Makefile
src/mesa/drivers/dri/dri.pc
- src/mesa/drivers/dri/Makefile
src/mesa/drivers/dri/common/Makefile
src/mesa/drivers/dri/i915/Makefile
src/mesa/drivers/dri/i965/Makefile
+ src/mesa/drivers/dri/Makefile
src/mesa/drivers/dri/nouveau/Makefile
src/mesa/drivers/dri/r200/Makefile
src/mesa/drivers/dri/radeon/Makefile
src/mesa/drivers/dri/swrast/Makefile
+ src/mesa/drivers/osmesa/Makefile
+ src/mesa/drivers/osmesa/osmesa.pc
src/mesa/drivers/x11/Makefile
- src/mesa/gl.pc
- src/mesa/osmesa.pc])
+ src/mesa/libdricore/Makefile
+ src/mesa/main/tests/Makefile
+ src/mesa/x86-64/Makefile
+ src/mesa/x86/Makefile])
dnl Sort the dirs alphabetically
GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
echo ""
echo " Shared libs: $enable_shared"
echo " Static libs: $enable_static"
+echo " Shared-glapi: $enable_shared_glapi"
dnl Compiler options
# cleanup the CFLAGS/CXXFLAGS/DEFINES vars
-cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
+cflags=`echo $CFLAGS $PIC_FLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
-cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \
+cxxflags=`echo $CXXFLAGS $PIC_FLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
defines=`echo $DEFINES | $SED 's/^ *//;s/ */ /;s/ *$//'`
echo ""