dri: Remove unused driIntersectArea
[mesa.git] / configure.ac
index ea58dae6593bdaa73626a5bb8ee35784fccaa1ff..30b3b96c30e944a5474728d0150718c061096393 100644 (file)
@@ -24,7 +24,7 @@ USER_CXXFLAGS="$CXXFLAGS"
 dnl Versions for external dependencies
 LIBDRM_REQUIRED=2.4.24
 LIBDRM_RADEON_REQUIRED=2.4.24
-LIBDRM_INTEL_REQUIRED=2.4.24
+LIBDRM_INTEL_REQUIRED=2.4.27
 LIBDRM_NOUVEAU_REQUIRED=0.6
 DRI2PROTO_REQUIRED=2.6
 GLPROTO_REQUIRED=1.4.14
@@ -172,6 +172,10 @@ if test "x$GCC" = xyes; then
 
     # Work around aliasing bugs - developers should comment this out
     CFLAGS="$CFLAGS -fno-strict-aliasing"
+
+    # gcc's builtin memcmp is slower than glibc's
+    # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+    CFLAGS="$CFLAGS -fno-builtin-memcmp"
 fi
 if test "x$GXX" = xyes; then
     CXXFLAGS="$CXXFLAGS -Wall"
@@ -191,6 +195,10 @@ if test "x$GXX" = xyes; then
 
     # Work around aliasing bugs - developers should comment this out
     CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
+
+    # gcc's builtin memcmp is slower than glibc's
+    # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+    CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
 fi
 
 dnl even if the compiler appears to support it, using visibility attributes isn't
@@ -341,6 +349,28 @@ else
     esac
 fi
 
+dnl
+dnl Mangled Mesa support
+dnl
+AC_ARG_ENABLE([mangling],
+  [AS_HELP_STRING([--enable-mangling],
+    [enable mangled symbols and library name @<:@default=disabled@:>@])],
+  [enable_mangling="${enableval}"],
+  [enable_mangling=no]
+)
+GL_LIB="GL"
+GLU_LIB="GLU"
+OSMESA_LIB="OSMesa"
+if test "x${enable_mangling}" = "xyes" ; then
+  DEFINES="${DEFINES} -DUSE_MGL_NAMESPACE"
+  GL_LIB="MangledGL"
+  GLU_LIB="MangledGLU"
+  OSMESA_LIB="MangledOSMesa"
+fi
+AC_SUBST([GL_LIB])
+AC_SUBST([GLU_LIB])
+AC_SUBST([OSMESA_LIB])
+
 dnl
 dnl potentially-infringing-but-nobody-knows-for-sure stuff
 dnl
@@ -949,13 +979,6 @@ xyesyes)
     fi
     GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $DLOPEN_LIBS"
     GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
-
-    # if static, move the external libraries to the programs
-    # and empty the libraries for libGL
-    if test "$enable_static" = yes; then
-        APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS"
-        GL_LIB_DEPS=""
-    fi
     ;;
 xyesno)
     # DRI-based GLX
@@ -1161,25 +1184,20 @@ if test "x$enable_dri" = xyes; then
 
         case "$host_cpu" in
         x86_64)
-            # sis is missing because they have not be converted to use
-            # the new interface.  i810 are missing because there is no
-            # x86-64 system where they could *ever* be used.
             if test "x$DRI_DIRS" = "xyes"; then
-                DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
-                    radeon savage tdfx unichrome swrast"
+                DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
             fi
             ;;
         powerpc*)
             # Build only the drivers for cards that exist on PowerPC.
-            # At some point MGA will be added, but not yet.
             if test "x$DRI_DIRS" = "xyes"; then
-                DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast"
+                DRI_DIRS="r200 radeon swrast"
             fi
             ;;
         sparc*)
-            # Build only the drivers for cards that exist on sparc`
+            # Build only the drivers for cards that exist on sparc
             if test "x$DRI_DIRS" = "xyes"; then
-                DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast"
+                DRI_DIRS="r200 radeon swrast"
             fi
             ;;
         esac
@@ -1189,8 +1207,7 @@ if test "x$enable_dri" = xyes; then
         DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
 
         if test "x$DRI_DIRS" = "xyes"; then
-            DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
-                radeon tdfx unichrome savage sis swrast"
+            DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
         fi
         ;;
     gnu*)
@@ -1210,8 +1227,7 @@ if test "x$enable_dri" = xyes; then
 
     # default drivers
     if test "x$DRI_DIRS" = "xyes"; then
-        DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \
-            savage sis tdfx unichrome swrast"
+        DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
     fi
 
     DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/  */ /g'`
@@ -1260,20 +1276,10 @@ case $DRI_DIRS in
 esac
 
 case $DRI_DIRS in
-*radeon*|*r200*|*r300*|*r600*)
-    PKG_CHECK_MODULES([LIBDRM_RADEON],
-                     [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED],
-                     HAVE_LIBDRM_RADEON=yes,
-                     HAVE_LIBDRM_RADEON=no)
-
-    if test "x$HAVE_LIBDRM_RADEON" = xyes; then
-       RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
-       RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
-    fi
+*radeon*|*r200*)
+    PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
     ;;
 esac
-AC_SUBST([RADEON_CFLAGS])
-AC_SUBST([RADEON_LDFLAGS])
 
 
 dnl
@@ -1294,17 +1300,16 @@ if test "x$osmesa_bits" != x8; then
 fi
 case "x$osmesa_bits" in
 x8)
-    OSMESA_LIB=OSMesa
+    OSMESA_LIB="${OSMESA_LIB}"
     ;;
 x16|x32)
-    OSMESA_LIB="OSMesa$osmesa_bits"
+    OSMESA_LIB="${OSMESA_LIB}$osmesa_bits"
     DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
     ;;
 *)
     AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option])
     ;;
 esac
-AC_SUBST([OSMESA_LIB])
 
 if test "x$enable_osmesa" = xyes; then
     # only link libraries with osmesa if shared
@@ -1585,7 +1590,6 @@ if test "x$enable_glu" = xyes; then
         else
             GLU_LIB_DEPS=""
             GLU_MESA_DEPS=""
-            APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++"
         fi
     fi
 fi
@@ -1600,25 +1604,6 @@ AC_SUBST([GLU_PC_REQ_PRIV])
 AC_SUBST([GLU_PC_LIB_PRIV])
 AC_SUBST([GLU_PC_CFLAGS])
 
-dnl
-dnl Program library dependencies
-dnl    Only libm is added here if necessary as the libraries should
-dnl    be pulled in by the linker
-dnl
-if test "x$APP_LIB_DEPS" = x; then
-    case "$host_os" in
-    solaris*)
-        APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm"
-        ;;
-    cygwin*)
-        APP_LIB_DEPS="-lX11"
-        ;;
-    *)
-        APP_LIB_DEPS="-lm"
-        ;;
-    esac
-fi
-AC_SUBST([APP_LIB_DEPS])
 AC_SUBST([PROGRAM_DIRS])
 
 dnl
@@ -1670,6 +1655,9 @@ yes)
         if test "$plat" = "fbdev"; then
                 GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev"
         fi
+        if test "$plat" = "null"; then
+                GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
+        fi
        if test "$plat" = "wayland"; then
                PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \
                                  [AC_MSG_ERROR([cannot find libwayland-client])])
@@ -1750,7 +1738,7 @@ if test "x$enable_gallium_llvm" = xyes; then
     if test "x$LLVM_CONFIG" != xno; then
        LLVM_VERSION=`$LLVM_CONFIG --version`
        LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed 's/-DNDEBUG\>//g'`
-       LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++"
+       LLVM_LIBS="`$LLVM_CONFIG --libs`"
 
        LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
        DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"
@@ -1829,7 +1817,7 @@ if test "x$with_gallium_drivers" != x; then
         case "x$driver" in
         xsvga)
             GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
-            gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx" "xa-vmwgfx"
+            gallium_check_st "svga/drm" "dri-vmwgfx" "" "xa-vmwgfx"
             ;;
         xi915)
             PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
@@ -1855,12 +1843,12 @@ if test "x$with_gallium_drivers" != x; then
             ;;
         xr600)
             GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
-            gallium_check_st "r600/drm radeon/drm" "dri-r600" "" "" "xvmc-r600" "vdpau-r600" "va-r600"
+            gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" "va-r600"
             ;;
         xnouveau)
             PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
             GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
-            gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau"
+            gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
             ;;
         xswrast)
             GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS softpipe"
@@ -1880,9 +1868,9 @@ if test "x$with_gallium_drivers" != x; then
             if test "x$HAVE_ST_VA" = xyes; then
                 GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS va-softpipe"
             fi
-            if test "x$HAVE_ST_VDPAU" == xyes ||
-               test "x$HAVE_ST_XVMC" == xyes ||
-               test "x$HAVE_ST_VA" == xyes; then
+            if test "x$HAVE_ST_VDPAU" = xyes ||
+               test "x$HAVE_ST_XVMC" = xyes ||
+               test "x$HAVE_ST_VA" = xyes; then
                if test "x$HAVE_WINSYS_XLIB" != xyes; then
                   GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
                fi
@@ -1922,10 +1910,10 @@ ln -s autoconf configs/current
 ])
 
 dnl Sort the dirs alphabetically
-GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort|tr "\n" " "`
-GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort|tr "\n" " "`
-GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort|tr "\n" " "`
-GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort|tr "\n" " "`
+GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
+GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
+GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
+GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
 
 AC_OUTPUT