aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom2018-01-26 10:21:30 -0600
committerEric Engestrom2018-01-29 09:41:52 -0600
commitee47329bef727a109418f7134638e0fe67210748 (patch)
tree076307c0601452c83752525a3b7c98dd0c0e3bfe
parent540827cc7da2228ae54947adcbf33555a48d0b1c (diff)
downloadexternal-libdrm-ee47329bef727a109418f7134638e0fe67210748.tar.gz
external-libdrm-ee47329bef727a109418f7134638e0fe67210748.tar.xz
external-libdrm-ee47329bef727a109418f7134638e0fe67210748.zip
meson,configure: always define HAVE_{INTEL,VMWGFX,NOUVEAU,EXYNOS,VC4,RADEON}
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r--configure.ac14
-rw-r--r--libkms/linux.c10
-rw-r--r--meson.build4
3 files changed, 20 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 6bb8d9f5..32ceba69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -358,16 +358,22 @@ AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes])
358AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes]) 358AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])
359if test "x$INTEL" = xyes; then 359if test "x$INTEL" = xyes; then
360 AC_DEFINE(HAVE_INTEL, 1, [Have intel support]) 360 AC_DEFINE(HAVE_INTEL, 1, [Have intel support])
361else
362 AC_DEFINE(HAVE_INTEL, 0)
361fi 363fi
362 364
363AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes]) 365AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes])
364if test "x$VMWGFX" = xyes; then 366if test "x$VMWGFX" = xyes; then
365 AC_DEFINE(HAVE_VMWGFX, 1, [Have vmwgfx kernel headers]) 367 AC_DEFINE(HAVE_VMWGFX, 1, [Have vmwgfx kernel headers])
368else
369 AC_DEFINE(HAVE_VMWGFX, 0)
366fi 370fi
367 371
368AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) 372AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
369if test "x$NOUVEAU" = xyes; then 373if test "x$NOUVEAU" = xyes; then
370 AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau (nvidia) support]) 374 AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau (nvidia) support])
375else
376 AC_DEFINE(HAVE_NOUVEAU, 0)
371fi 377fi
372 378
373AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes]) 379AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes])
@@ -375,6 +381,8 @@ AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes])
375AM_CONDITIONAL(HAVE_EXYNOS, [test "x$EXYNOS" = xyes]) 381AM_CONDITIONAL(HAVE_EXYNOS, [test "x$EXYNOS" = xyes])
376if test "x$EXYNOS" = xyes; then 382if test "x$EXYNOS" = xyes; then
377 AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support]) 383 AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support])
384else
385 AC_DEFINE(HAVE_EXYNOS, 0)
378fi 386fi
379 387
380AM_CONDITIONAL(HAVE_FREEDRENO, [test "x$FREEDRENO" = xyes]) 388AM_CONDITIONAL(HAVE_FREEDRENO, [test "x$FREEDRENO" = xyes])
@@ -392,6 +400,8 @@ fi
392AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes]) 400AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes])
393if test "x$RADEON" = xyes; then 401if test "x$RADEON" = xyes; then
394 AC_DEFINE(HAVE_RADEON, 1, [Have radeon support]) 402 AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
403else
404 AC_DEFINE(HAVE_RADEON, 0)
395fi 405fi
396 406
397if test "x$AMDGPU" != xno; then 407if test "x$AMDGPU" != xno; then
@@ -421,6 +431,8 @@ if test "x$AMDGPU" = xyes; then
421 if test "x$have_cunit" = "xno"; then 431 if test "x$have_cunit" = "xno"; then
422 AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) 432 AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
423 fi 433 fi
434else
435 AC_DEFINE(HAVE_AMDGPU, 0)
424fi 436fi
425 437
426AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes]) 438AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes])
@@ -428,6 +440,8 @@ AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes])
428AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes]) 440AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
429if test "x$VC4" = xyes; then 441if test "x$VC4" = xyes; then
430 AC_DEFINE(HAVE_VC4, 1, [Have VC4 support]) 442 AC_DEFINE(HAVE_VC4, 1, [Have VC4 support])
443else
444 AC_DEFINE(HAVE_VC4, 0)
431fi 445fi
432 446
433AM_CONDITIONAL(HAVE_ETNAVIV, [test "x$ETNAVIV" = xyes]) 447AM_CONDITIONAL(HAVE_ETNAVIV, [test "x$ETNAVIV" = xyes])
diff --git a/libkms/linux.c b/libkms/linux.c
index 0b50777e..1431eb10 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -110,27 +110,27 @@ linux_from_sysfs(int fd, struct kms_driver **out)
110 if (ret) 110 if (ret)
111 return ret; 111 return ret;
112 112
113#ifdef HAVE_INTEL 113#if HAVE_INTEL
114 if (!strcmp(name, "intel")) 114 if (!strcmp(name, "intel"))
115 ret = intel_create(fd, out); 115 ret = intel_create(fd, out);
116 else 116 else
117#endif 117#endif
118#ifdef HAVE_VMWGFX 118#if HAVE_VMWGFX
119 if (!strcmp(name, "vmwgfx")) 119 if (!strcmp(name, "vmwgfx"))
120 ret = vmwgfx_create(fd, out); 120 ret = vmwgfx_create(fd, out);
121 else 121 else
122#endif 122#endif
123#ifdef HAVE_NOUVEAU 123#if HAVE_NOUVEAU
124 if (!strcmp(name, "nouveau")) 124 if (!strcmp(name, "nouveau"))
125 ret = nouveau_create(fd, out); 125 ret = nouveau_create(fd, out);
126 else 126 else
127#endif 127#endif
128#ifdef HAVE_RADEON 128#if HAVE_RADEON
129 if (!strcmp(name, "radeon")) 129 if (!strcmp(name, "radeon"))
130 ret = radeon_create(fd, out); 130 ret = radeon_create(fd, out);
131 else 131 else
132#endif 132#endif
133#ifdef HAVE_EXYNOS 133#if HAVE_EXYNOS
134 if (!strcmp(name, "exynos")) 134 if (!strcmp(name, "exynos"))
135 ret = exynos_create(fd, out); 135 ret = exynos_create(fd, out);
136 else 136 else
diff --git a/meson.build b/meson.build
index fa00254b..7298f741 100644
--- a/meson.build
+++ b/meson.build
@@ -256,9 +256,7 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
256 [with_exynos, 'EXYNOS'], 256 [with_exynos, 'EXYNOS'],
257 [with_vc4, 'VC4'], 257 [with_vc4, 'VC4'],
258 [with_radeon, 'RADEON']] 258 [with_radeon, 'RADEON']]
259 if t[0] 259 config.set10('HAVE_@0@'.format(t[1]), t[0])
260 config.set10('HAVE_@0@'.format(t[1]), true)
261 endif
262endforeach 260endforeach
263if with_freedreno_kgsl 261if with_freedreno_kgsl
264 if not with_freedreno 262 if not with_freedreno