gallium/targets: Make use of prebuilt libdricommon.la.

libdricommon.la is available whenever a non swrast driver is built.
All the classic dri drivers make use of the prebuild library but all
of the gallium ones rebuild it explicitly.

While we're here gallium/{llvm,soft}pipe does not require HAVE_COMMON_DRI
thus do not set in during configure.

v2: [Emil] Add commit message and drop HAVE_COMMON_DRI from configure.ac
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
mesa/drivers: drop HAVE_*_DRI from individual makefiles

The mesa/drivers/dri/Makefile.am already guards the individual
targets/subdirs with HAVE_*_DRI before including them. Thus making
the additional check within each Makefile.am unnecessary.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
gallium/radeon: drop unused variable LIBGALLIUM_LIBS

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
r600: use NEED_RADEON_LLVM over R600_NEED_RADEON_GALLIUM

libllvmradeon.la is available whenever NEED_RADEON_LLVM is set, using
R600_NEED_RADEON_GALLIUM is rather ambiguous and unnecessary. Drop it
in favour of NEED_RADEON_LLVM.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
softpipe: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
rbug: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
llvmpipe: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
trace: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
freedreno: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
identity: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
noop: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
galahad: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
st/dri: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
st/dri/sw: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
st/xorg: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
st/vega: consolidate C sources list into Makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
gallium/drivers: factor out common include flags into drivers/Automake.inc

Factor out the following
* $(GALLIUM_CFLAGS)
* -I$(top_srcdir)/src/gallium/drivers

into a gallium/drivers' specific Automake.inc. Use AM_CPPFLAGS as
include and define flags are preprocessor rather than compiler
specific.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
gallium/targets: factor common AM_C{,PP}FLAGS into per target Automake.inc

Due to the duplication of AM_CFLAGS and AM_CPPFLAGS across multiple
targets, it would make sense to factor out the common FLAGS into a
per target Automake.*.inc

With this approach targetwide changes can be easily done by editing
a single file, updating all drivers. If a driver requires different
and/or additional C{,PP}FLAGS they can easily append or overwrite
the common ones.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>