X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=configure.ac;h=3e1f0803e8500d843a152919dfbf2a747834347d;hb=5985de6f1a9e7b01aef99d75d9564f7b2c40688b;hp=fdb76760c4f8b034da842c05ecc5e4f8f84f3c7a;hpb=78e1246bece3d14e2e0c194493e676e9c50f342f;p=android-x86%2Fexternal-mesa.git diff --git a/configure.ac b/configure.ac index fdb76760c4f..3e1f0803e85 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,34 @@ +dnl Copyright © 2011-2014 Intel Corporation +dnl Copyright © 2011-2014 Emil Velikov +dnl Copyright © 2007-2010 Dan Nicholson +dnl Copyright © 2010-2014 Marek Olšák +dnl Copyright © 2010-2014 Christian König +dnl Copyright © 2012-2014 Tom Stellard +dnl Copyright © 2009-2012 Jakob Bornecrantz +dnl Copyright © 2009-2014 Jon TURNEY +dnl Copyright © 2011-2012 Benjamin Franzke +dnl Copyright © 2008-2014 David Airlie +dnl Copyright © 2009-2013 Brian Paul +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. +dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) @@ -47,6 +78,7 @@ XCBDRI2_REQUIRED=1.8 XCBGLX_REQUIRED=1.8.1 XSHMFENCE_REQUIRED=1.1 XVMC_REQUIRED=1.0.6 +PYTHON_MAKO_REQUIRED=0.3.4 dnl Check for progs AC_PROG_CPP @@ -73,7 +105,27 @@ AX_PROG_FLEX([], AC_CHECK_PROG(INDENT, indent, indent, cat) if test "x$INDENT" != "xcat"; then - AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -TGLubyte -TGLbyte -TBool') + # Only GNU indent is supported + INDENT_VERSION=`indent --version | grep GNU` + if test $? -eq 0; then + AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -TGLubyte -TGLbyte -TBool') + else + INDENT="cat" + fi +fi + +AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED) + +if test -z "$PYTHON2"; then + if test ! -f "$srcdir/src/util/format_srgb.c"; then + AC_MSG_ERROR([Python not found - unable to generate sources]) + fi +else + if test "x$acv_mako_found" = xno; then + if test ! -f "$srcdir/src/mesa/main/format_unpack.c"; then + AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found]) + fi + fi fi AC_PROG_INSTALL @@ -102,9 +154,10 @@ AC_COMPILE_IFELSE( AC_MSG_RESULT([$acv_mesa_CLANG]) -dnl If we're using GCC, make sure that it is at least version 4.1.0. Older +dnl If we're using GCC, make sure that it is at least version 4.2.0. Older dnl versions are explictly not supported. GEN_ASM_OFFSETS=no +USE_GNU99=no if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then AC_MSG_CHECKING([whether gcc version is sufficient]) major=0 @@ -116,13 +169,16 @@ if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then GCC_VERSION_MINOR=`echo $GCC_VERSION | cut -d. -f2` fi - if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 1 ; then + if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 2 ; then AC_MSG_RESULT([no]) - AC_MSG_ERROR([If using GCC, version 4.1.0 or later is required.]) + AC_MSG_ERROR([If using GCC, version 4.2.0 or later is required.]) else AC_MSG_RESULT([yes]) fi + if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 6 ; then + USE_GNU99=yes + fi if test "x$cross_compiling" = xyes; then GEN_ASM_OFFSETS=yes fi @@ -181,7 +237,13 @@ esac dnl Add flags for gcc and g++ if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Wall -std=c99" + CFLAGS="$CFLAGS -Wall" + + if test "x$USE_GNU99" = xyes; then + CFLAGS="$CFLAGS -std=gnu99" + else + CFLAGS="$CFLAGS -std=c99" + fi # Enable -Werror=implicit-function-declaration and # -Werror=missing-prototypes, if available, or otherwise, just @@ -547,6 +609,7 @@ if test "x$enable_asm" = xyes; then fi AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"]) +AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"]) AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"]) dnl Check to see if dlopen is in default libraries (like Solaris, which @@ -848,7 +911,7 @@ x*yes*yes*) esac # Building Xlib-GLX requires shared glapi to be disabled. -if test "x$enable_xlib_glx" = xyes; then +if test "x$enable_shared_glapi$enable_xlib_glx" = xyesyes; then AC_MSG_NOTICE([Shared GLAPI should not used with Xlib-GLX, disabling]) enable_shared_glapi=no fi @@ -1316,8 +1379,15 @@ if test "x$enable_egl" = xyes; then if test "$enable_static" != yes; then if test "x$enable_dri" = xyes; then - HAVE_EGL_DRIVER_DRI2=1 - fi + HAVE_EGL_DRIVER_DRI2=1 + if test "x$enable_shared_glapi" = xno; then + AC_MSG_ERROR([egl_dri2 requires --enable-shared-glapi]) + fi + else + # Avoid building an "empty" libEGL. Drop/update this + # when other backends (haiku?) come along. + AC_MSG_ERROR([egl requires --enable-dri]) + fi fi fi @@ -1384,15 +1454,24 @@ if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then fi fi -if test "x$enable_xvmc" = xyes -o \ +if test "x$enable_dri" = xyes -o \ + "x$enable_xvmc" = xyes -o \ "x$enable_vdpau" = xyes -o \ "x$enable_omx" = xyes -o \ "x$enable_va" = xyes; then - PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED]) need_gallium_vl=yes fi AM_CONDITIONAL(NEED_GALLIUM_VL, test "x$need_gallium_vl" = xyes) +if test "x$enable_xvmc" = xyes -o \ + "x$enable_vdpau" = xyes -o \ + "x$enable_omx" = xyes -o \ + "x$enable_va" = xyes; then + PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED]) + need_gallium_vl_winsys=yes +fi +AM_CONDITIONAL(NEED_GALLIUM_VL_WINSYS, test "x$need_gallium_vl_winsys" = xyes) + if test "x$enable_xvmc" = xyes; then PKG_CHECK_MODULES([XVMC], [xvmc >= $XVMC_REQUIRED]) enable_gallium_loader=$enable_shared_pipe_drivers @@ -1542,6 +1621,13 @@ if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then AC_MSG_ERROR([cannot build egl state tracker without EGL library]) fi +PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland_scanner], + WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland_scanner`, + WAYLAND_SCANNER='') +if test "x$WAYLAND_SCANNER" = x; then + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner]) +fi + # Do per-EGL platform setups and checks egl_platforms=`IFS=', '; echo $with_egl_platforms` for plat in $egl_platforms; do @@ -1549,9 +1635,9 @@ for plat in $egl_platforms; do wayland) PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED]) - WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client` - AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],, - [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH]) + if test "x$WAYLAND_SCANNER" = x; then + AC_MSG_ERROR([wayland-scanner is needed to compile the wayland egl platform]) + fi ;; x11) @@ -1582,7 +1668,7 @@ done # libEGL wants to default to the first platform specified in # ./configure. parse that here. if test "x$egl_platforms" != "x"; then - FIRST_PLATFORM_CAPS=`echo $egl_platforms | sed 's| .*||' | tr 'a-z' 'A-Z'` + FIRST_PLATFORM_CAPS=`echo $egl_platforms | sed 's| .*||' | tr '[[a-z]]' '[[A-Z]]'` EGL_NATIVE_PLATFORM="_EGL_PLATFORM_$FIRST_PLATFORM_CAPS" else EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM" @@ -1724,7 +1810,7 @@ if test "x$enable_gallium_llvm" = xyes; then fi if test "x$enable_opencl" = xyes; then - LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation" + LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation" # LLVM 3.3 >= 177971 requires IRReader if $LLVM_CONFIG --components | grep -qw 'irreader'; then LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader" @@ -2223,8 +2309,6 @@ AC_CONFIG_FILES([Makefile src/mapi/es1api/glesv1_cm.pc src/mapi/es2api/glesv2.pc src/mapi/glapi/gen/Makefile - src/mapi/vgapi/Makefile - src/mapi/vgapi/vg.pc src/mesa/Makefile src/mesa/gl.pc src/mesa/drivers/dri/dri.pc