X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=896f98a53bb5d78acdec43f878e2eafc04f9a57f;hb=3767b25bd3f77cede452cfbe9b66a51b352d9036;hp=59e8874464ed745dd41be863c9eea99c4bfa8de8;hpb=8cdce6c136799aa75310086c078d8cd5f19b84ce;p=mesa.git diff --git a/configure.ac b/configure.ac index 59e8874464e..896f98a53bb 100644 --- a/configure.ac +++ b/configure.ac @@ -6,9 +6,10 @@ dnl Tell the user about autoconf.html in the --help output m4_divert_once([HELP_END], [ See docs/autoconf.html for more details on the options for Mesa.]) -AC_INIT([Mesa], [8.1.0], +AC_INIT([Mesa], [9.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) AC_CONFIG_AUX_DIR([bin]) +AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_HOST AM_INIT_AUTOMAKE([foreign]) @@ -26,10 +27,14 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) LT_PREREQ([2.2]) LT_INIT([disable-static]) +dnl Set internal versions +OSMESA_VERSION=8 +AC_SUBST([OSMESA_VERSION]) + dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.24 -LIBDRM_RADEON_REQUIRED=2.4.38 -LIBDRM_INTEL_REQUIRED=2.4.37 +LIBDRM_RADEON_REQUIRED=2.4.39 +LIBDRM_INTEL_REQUIRED=2.4.38 LIBDRM_NVVIEUX_REQUIRED=2.4.33 LIBDRM_NOUVEAU_REQUIRED=2.4.33 DRI2PROTO_REQUIRED=2.6 @@ -55,7 +60,7 @@ fi 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 @@ -283,6 +288,8 @@ xnono ) ;; esac +AM_CONDITIONAL(BUILD_SHARED, test "x$enable_shared" = xyes) + dnl dnl mklib options dnl @@ -338,18 +345,12 @@ AC_ARG_WITH([gl-lib-name], [specify GL library name @<:@default=GL@:>@])], [GL_LIB=$withval], [GL_LIB=GL]) -AC_ARG_WITH([glu-lib-name], - [AS_HELP_STRING([--with-glu-lib-name@<:@=NAME@:>@], - [specify GLU library name @<:@default=GLU@:>@])], - [GLU_LIB=$withval], - [GLU_LIB=GLU]) AC_ARG_WITH([osmesa-lib-name], [AS_HELP_STRING([--with-osmesa-lib-name@<:@=NAME@:>@], [specify OSMesa library name @<:@default=OSMesa@:>@])], [OSMESA_LIB=$withval], [OSMESA_LIB=OSMesa]) AS_IF([test "x$GL_LIB" = xyes], [GL_LIB=GL]) -AS_IF([test "x$GLU_LIB" = xyes], [GLU_LIB=GLU]) AS_IF([test "x$OSMESA_LIB" = xyes], [OSMESA_LIB=OSMesa]) dnl @@ -364,11 +365,9 @@ AC_ARG_ENABLE([mangling], if test "x${enable_mangling}" = "xyes" ; then DEFINES="${DEFINES} -DUSE_MGL_NAMESPACE" GL_LIB="Mangled${GL_LIB}" - GLU_LIB="Mangled${GLU_LIB}" OSMESA_LIB="Mangled${OSMESA_LIB}" fi AC_SUBST([GL_LIB]) -AC_SUBST([GLU_LIB]) AC_SUBST([OSMESA_LIB]) dnl @@ -387,7 +386,6 @@ if test "x$enable_texture_float" = xyes; then fi GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION} -GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION} OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION} GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION} @@ -396,7 +394,6 @@ VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION} GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION} 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}'*' 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}'*' @@ -405,7 +402,6 @@ VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENS GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' AC_SUBST([GL_LIB_NAME]) -AC_SUBST([GLU_LIB_NAME]) AC_SUBST([OSMESA_LIB_NAME]) AC_SUBST([EGL_LIB_NAME]) AC_SUBST([GLESv1_CM_LIB_NAME]) @@ -414,7 +410,6 @@ AC_SUBST([VG_LIB_NAME]) AC_SUBST([GLAPI_LIB_NAME]) AC_SUBST([GL_LIB_GLOB]) -AC_SUBST([GLU_LIB_GLOB]) AC_SUBST([EGL_LIB_GLOB]) AC_SUBST([GLESv1_CM_LIB_GLOB]) AC_SUBST([GLESv2_LIB_GLOB]) @@ -497,13 +492,24 @@ 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_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) +dnl signbit() is a macro in glibc's math.h, so AC_CHECK_FUNC fails. To handle +dnl this, use AC_CHECK_DECLS and fallback to AC_CHECK_FUNC in case it fails. +AC_CHECK_DECLS([signbit],[], + AC_CHECK_FUNC([signbit],[], + AC_MSG_ERROR([could not find signbit()])), + [#include ]) + +dnl Check for pthreads +AX_PTHREAD + dnl SELinux awareness. AC_ARG_ENABLE([selinux], [AS_HELP_STRING([--enable-selinux], @@ -518,6 +524,7 @@ if test "x$enable_selinux" = "xyes"; then SELINUX_LIBS="-lselinux" DEFINES="$DEFINES -DMESA_SELINUX" fi +AC_SUBST([SELINUX_LIBS]) dnl Options for APIs AC_ARG_ENABLE([opengl], @@ -572,11 +579,13 @@ AC_ARG_ENABLE([xa], [enable build of the XA X Acceleration API @<:@default=no@:>@])], [enable_xa="$enableval"], [enable_xa=no]) -AC_ARG_ENABLE([d3d1x], - [AS_HELP_STRING([--enable-d3d1x], - [enable support for Direct3D 10 & 11 low-level API @<:@default=no@:>@])], - [enable_d3d1x="$enableval"], - [enable_d3d1x=no]) +dnl Broken, unmaintained. Don't want to see bug reports about it without patches. +enable_d3d1x=no +dnl AC_ARG_ENABLE([d3d1x], +dnl [AS_HELP_STRING([--enable-d3d1x], +dnl [enable support for Direct3D 10 & 11 low-level API @<:@default=no@:>@])], +dnl [enable_d3d1x="$enableval"], +dnl [enable_d3d1x=no]) AC_ARG_ENABLE([gbm], [AS_HELP_STRING([--enable-gbm], [enable gbm library @<:@default=auto@:>@])], @@ -641,7 +650,7 @@ GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast" AC_ARG_WITH([gallium-drivers], [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@], [comma delimited Gallium drivers list, e.g. - "i915,nouveau,r300,r600,svga,swrast" + "i915,nouveau,r300,r600,radeonsi,svga,swrast" @<:@default=r300,r600,swrast@:>@])], [with_gallium_drivers="$withval"], [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"]) @@ -864,13 +873,12 @@ xyesyes) xyesno) # DRI-based GLX PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) - GL_PC_REQ_PRIV="glproto >= $GLPROTO_REQUIRED" if test x"$driglx_direct" = xyes; then if test "x$have_libdrm" != xyes; then AC_MSG_ERROR([Direct rendering requires libdrm >= $LIBDRM_REQUIRED]) fi PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) - GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" + GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED" fi # find the DRI deps for libGL @@ -902,6 +910,7 @@ GLESv1_CM_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" GLESv2_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" GLESv2_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" +AC_SUBST([X11_INCLUDES]) AC_SUBST([GL_LIB_DEPS]) AC_SUBST([GL_PC_REQ_PRIV]) AC_SUBST([GL_PC_LIB_PRIV]) @@ -912,12 +921,7 @@ AC_SUBST([GLESv1_CM_PC_LIB_PRIV]) AC_SUBST([GLESv2_LIB_DEPS]) AC_SUBST([GLESv2_PC_LIB_PRIV]) -GLAPI_LIB_DEPS="-lpthread $SELINUX_LIBS" -AC_SUBST([GLAPI_LIB_DEPS]) - - 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]) @@ -1196,13 +1200,10 @@ if test "x$enable_osmesa" = xyes; then OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" fi -OSMESA_VERSION=`echo "$VERSION" | $SED 's/\./:/g'` - AC_SUBST([OSMESA_LIB_DEPS]) AC_SUBST([OSMESA_MESA_DEPS]) AC_SUBST([OSMESA_PC_REQ]) AC_SUBST([OSMESA_PC_LIB_PRIV]) -AC_SUBST([OSMESA_VERSION]) dnl dnl gbm configuration @@ -1226,6 +1227,8 @@ if test "x$enable_gbm" = xyes; 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" @@ -1367,6 +1370,8 @@ if test "x$enable_openvg" = xyes; then 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 @@ -1461,60 +1466,6 @@ if test "x$enable_opencl" = xyes; then enable_gallium_loader=yes fi -dnl -dnl GLU configuration -dnl -AC_ARG_ENABLE([glu], - [AS_HELP_STRING([--disable-glu], - [enable OpenGL Utility library @<:@default=enabled@:>@])], - [enable_glu="$enableval"], - [enable_glu=yes]) - -if test "x$enable_glu" = xyes; then - if test "x$enable_glx" = xno -a "x$enable_osmesa" = xno; then - AC_MSG_NOTICE([Disabling GLU since there is no OpenGL driver]) - enable_glu=no - fi -fi - -if test "x$enable_glu" = xyes; then - SRC_DIRS="$SRC_DIRS glu" - - if test "x$enable_glx" = xno; then - # Link libGLU to libOSMesa instead of libGL - GLU_LIB_DEPS="" - GLU_PC_REQ="osmesa" - if test "$enable_static" = no; then - GLU_MESA_DEPS='-l$(OSMESA_LIB)' - else - GLU_MESA_DEPS="" - fi - else - # If static, empty GLU_LIB_DEPS and add libs for programs to link - GLU_PC_REQ="gl" - GLU_PC_LIB_PRIV="-lm" - if test "$enable_static" = no; then - GLU_LIB_DEPS="-lm" - GLU_MESA_DEPS='-l$(GL_LIB)' - else - GLU_LIB_DEPS="" - GLU_MESA_DEPS="" - fi - fi -fi -if test "$enable_static" = no; then - GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS" -fi -GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS" -AC_SUBST([GLU_LIB_DEPS]) -AC_SUBST([GLU_MESA_DEPS]) -AC_SUBST([GLU_PC_REQ]) -AC_SUBST([GLU_PC_REQ_PRIV]) -AC_SUBST([GLU_PC_LIB_PRIV]) -AC_SUBST([GLU_PC_CFLAGS]) - -AC_SUBST([PROGRAM_DIRS]) - dnl dnl Gallium configuration dnl @@ -1996,60 +1947,62 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" 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/mapi/shared-glapi/Makefile src/mapi/shared-glapi/tests/Makefile - src/gtest/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/drivers/osmesa/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" " "` @@ -2105,9 +2058,6 @@ xyesno) ;; esac -echo "" -echo " GLU: $enable_glu" - dnl EGL echo "" echo " EGL: $enable_egl"