st/dri: implement new driver hook flush_with_flags
[mesa.git] / configure.ac
index 006f4faac84340398bcac64418c326d6b495365c..803c2564942db208bc330db823d605bb44e3e287 100644 (file)
@@ -1273,10 +1273,6 @@ if test "x$enable_egl" = xyes; then
 
     if test "$enable_static" != yes; then
         # build egl_glx when libGL is built
-        if test "x$enable_glx" = xyes; then
-           HAVE_EGL_DRIVER_GLX=1
-        fi
-
         PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
                           [have_libudev=yes],[have_libudev=no])
         if test "$have_libudev" = yes; then
@@ -1534,8 +1530,7 @@ for plat in $egl_platforms; do
                ;;
 
        wayland)
-               PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 0.99.0 wayland-server >= 0.99.0],, \
-                                 [AC_MSG_ERROR([cannot find libwayland-client])])
+               PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2])
                GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
 
                 WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
@@ -1545,6 +1540,10 @@ for plat in $egl_platforms; do
 
        x11)
                PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 >= 1.8 xcb-xfixes])
+
+                if test "x$enable_glx" = xyes; then
+                        HAVE_EGL_DRIVER_GLX=1
+                fi
                ;;
 
        drm)
@@ -1641,6 +1640,21 @@ AC_ARG_WITH([llvm-prefix],
     [llvm_prefix=""])
 
 
+# Call this inside ` ` to get the return value.
+# $1 is the llvm-config command with arguments.
+strip_unwanted_llvm_flags() {
+    # Use \> (marks the end of the word)
+    echo `$1` | sed \
+       -e 's/-DNDEBUG\>//g' \
+       -e 's/-pedantic\>//g' \
+       -e 's/-Wcovered-switch-default\>//g' \
+       -e 's/-O.\>//g' \
+       -e 's/-g\>//g' \
+       -e 's/-Wall\>//g' \
+       -e 's/-fomit-frame-pointer\>//g'
+}
+
+
 if test "x$with_gallium_drivers" = x; then
     enable_gallium_llvm=no
 fi
@@ -1658,7 +1672,6 @@ if test "x$enable_gallium_llvm" = xyes; then
 
     if test "x$LLVM_CONFIG" != xno; then
        LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
-       LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g' -e 's/-O.//g' -e 's/-g//g' -e 's/-Wall//g'`
        if test "x$with_llvm_shared_libs" = xyes; then
            dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
            LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`"
@@ -1675,8 +1688,9 @@ if test "x$enable_gallium_llvm" = xyes; then
        fi
        LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
        LLVM_BINDIR=`$LLVM_CONFIG --bindir`
-       LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g' -e 's/-O.//g' -e 's/-g//g' -e 's/-Wall//g'`
-       LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g' -e 's/-O.//g' -e 's/-g//g' -e 's/-Wall//g'`
+       LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
+       LLVM_CFLAGS=$LLVM_CPPFLAGS   # CPPFLAGS seem to be sufficient
+       LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
        LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
        LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
        DEFINES="${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`"
@@ -2134,6 +2148,12 @@ echo "        CFLAGS:          $cflags"
 echo "        CXXFLAGS:        $cxxflags"
 echo "        Macros:          $defines"
 echo ""
+if test "x$MESA_LLVM" = x1; then
+    echo "        LLVM_CFLAGS:     $LLVM_CFLAGS"
+    echo "        LLVM_CXXFLAGS:   $LLVM_CXXFLAGS"
+    echo "        LLVM_CPPFLAGS:   $LLVM_CPPFLAGS"
+    echo ""
+fi
 echo "        PYTHON2:         $PYTHON2"
 
 echo ""