mesa: Move declaration to top of block.

To fix MSVC build.  Trivial.
(cherry picked from commit c98b704128ed450b46c61e139d9f17c652a74c09)
force non llvm build

(cherry picked from commit 4230f2e4cc60e8fe5a9861214ba7fd8654aa0b91)
mesa: use c99 functions on non-linux platforms if supported

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit 50fd079317cc051d20c96c16ade1f0de019a64c8)
ax_prog_flex.m4: make grep test more portable

Use grep -w instead of the empty string escape sequences
which are less portable.  Makes the grep test
function as intended on OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit e2e1d03aa2bf6daa776a8114c532508823c6f048)
Revert "fix vdpau interop when using -Bsymbolic-functions in ldflags"

This reverts commit 8c136b53b79e90b9e8f30f891b8bef112fee375d.

no --dynamic-list in OpenBSD ld

(cherry picked from commit 6acadd38211e2ac94865c89f7a82ff3f9bb6ff55)
try to load the correct libGL.so on OpenBSD

(cherry picked from commit 4283ced4c888a8464b0390f21f5ae158d4e6bba5)
ax_prog_flex.m4: handle gflex

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit f6ab61c819c832ee54f6072778c7eee47c22dbba)
r600g/sb: move r600_pipe.h include outside of extern C to fix LLVM build

(cherry picked from commit a53ca7635f035c96a3f1c963022cf7da2ea047d7)
configure.ac: strip _GNU_SOURCE from llvm-config output

Mesa already defines _GNU_SOURCE for glibc based systems
and defining _GNU_SOURCE will break the Mesa build
on other systems such as OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit 3736bea75573090085d89743b66a334150403828)
use gsed where non posix 'end of word' escape is used

(cherry picked from commit c588dddaa3702f3b5d0e4c90c71e56d693774798)
OpenBSD ports llvm is now a 3.5 snapshot from 20140228

avoid llvm 3.5 codepaths that use changes made after this date

(cherry picked from commit 1633831b047c62a1f119858b03eb6ef73f2f7f49)
add -lgbm to EGL

CVSROOT:        /cvs
Module name:    xenocara
Changes by:     landry@cvs.openbsd.org  2014/07/14 04:12:16

Modified files:
        dist/Mesa/src/egl/main: egl.pc.in

Log message:
Add -lgbm to Libs as a temporary workaround, since EGL has unknown
symbols from libgbm, and that breaks www/webkit (and probably all the 23
ports linking against EGL, which now probably need WANTLIB fixes..)

with/ok matthieu@

(cherry picked from commit 39da1051471c90d241918c7f645a7ef78b4f031d)
configure.ac: detect LLVM patch level when built via cmake

In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h when
LLVM was built via autoconf and not when it was built with cmake.
Fall back to retrieving the patch level from llvm-config --version to
handle this case.

Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
(cherry picked from commit 68b10addec2e667a0f636a8e6c2972334aa1976f)