OSDN Git Service

configure: Add machinery for --enable-shader-cache (and --disable-shader-cache)
authorCarl Worth <cworth@cworth.org>
Wed, 14 Jan 2015 23:53:00 +0000 (15:53 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 16 Jan 2015 21:47:40 +0000 (13:47 -0800)
commit59216f53ecb3076b64a0e55856382029919ba738
treef02542cf9aea8508aaafed8a071bbb8911924d48
parenta24bdce46f95cbe9efd3b26f157d1eb36584861f
configure: Add machinery for --enable-shader-cache (and --disable-shader-cache)

We don't actually have the code for the shader cache just yet, but
this configure machinery puts everything in place so that the shader
cache can be optionally compiled in.

Specifically, if the user passes no option (neither
--disable-shader-cache, nor --enable-shader-cache), then this feature
will be automatically detected based on the presence of a usable SHA-1
library. If no suitable library can be found, then the shader cache
will be automatically disabled, (and reported in the final output from
configure).

The user can force the shader-cache feature to not be compiled, (even
if a SHA-1 library is detected), by passing
--disable-shader-cache. This will prevent the compiled Mesa libraries
from depending on any library for SHA-1 implementation.

Finally, the user can also force the shader cache on with
--enable-shader-cache. This will cause configure to trigger a fatal
error if no sutiable SHA-1 implementation can be found for the
shader-cache feature.

Bug fix by José Fonseca <jfonseca@vmware.com>: Fix to put conditional
assignment in Makefile.am, not Makefile.sources to avoid breaking
scons build.

Note: As recommended by José, with this commit the scons build will
not compile any of the SHA-1-using code. This is waiting for someone
to write SConstruct detection of the available SHA-1 libraries, (and
set the appropriate HAVE_SHA1_* variables).

Reviewed-by: Matt Turner <mattst88@gmail.com>
configure.ac
src/util/Makefile.am
src/util/Makefile.sources
src/util/SConscript