aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac88
1 files changed, 63 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index f729fd87..1da9d86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
20 20
21AC_PREREQ([2.63]) 21AC_PREREQ([2.63])
22AC_INIT([libdrm], 22AC_INIT([libdrm],
23 [2.4.66], 23 [2.4.75],
24 [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI], 24 [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
25 [libdrm]) 25 [libdrm])
26 26
@@ -53,14 +53,15 @@ AC_USE_SYSTEM_EXTENSIONS
53AC_SYS_LARGEFILE 53AC_SYS_LARGEFILE
54AC_FUNC_ALLOCA 54AC_FUNC_ALLOCA
55 55
56AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h]) 56AC_HEADER_MAJOR
57AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
57 58
58# Initialize libtool 59# Initialize libtool
59LT_PREREQ([2.2]) 60LT_PREREQ([2.2])
60LT_INIT([disable-static]) 61LT_INIT([disable-static])
61 62
62 63
63PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs) 64
64AC_SUBST(PTHREADSTUBS_CFLAGS) 65AC_SUBST(PTHREADSTUBS_CFLAGS)
65AC_SUBST(PTHREADSTUBS_LIBS) 66AC_SUBST(PTHREADSTUBS_LIBS)
66 67
@@ -131,6 +132,16 @@ AC_ARG_ENABLE(rockchip-experimental-api,
131 [Enable support for rockchip's experimental API (default: disabled)]), 132 [Enable support for rockchip's experimental API (default: disabled)]),
132 [ROCKCHIP=$enableval], [ROCKCHIP=no]) 133 [ROCKCHIP=$enableval], [ROCKCHIP=no])
133 134
135AC_ARG_ENABLE(vc4,
136 AS_HELP_STRING([--disable-vc4],
137 [Enable support for vc4's API (default: auto, enabled on arm)]),
138 [VC4=$enableval], [VC4=auto])
139
140AC_ARG_ENABLE(etnaviv-experimental-api,
141 AS_HELP_STRING([--enable-etnaviv-experimental-api],
142 [Enable support for etnaviv's experimental API (default: disabled)]),
143 [ETNAVIV=$enableval], [ETNAVIV=no])
144
134AC_ARG_ENABLE(install-test-programs, 145AC_ARG_ENABLE(install-test-programs,
135 AS_HELP_STRING([--enable-install-test-programs], 146 AS_HELP_STRING([--enable-install-test-programs],
136 [Install test programs (default: no)]), 147 [Install test programs (default: no)]),
@@ -179,7 +190,8 @@ MAYBE_WARN="-Wall -Wextra \
179-Wstrict-aliasing=2 -Winit-self \ 190-Wstrict-aliasing=2 -Winit-self \
180-Wdeclaration-after-statement -Wold-style-definition \ 191-Wdeclaration-after-statement -Wold-style-definition \
181-Wno-unused-parameter \ 192-Wno-unused-parameter \
182-Wno-attributes -Wno-long-long -Winline -Wshadow" 193-Wno-attributes -Wno-long-long -Winline -Wshadow \
194-Wno-missing-field-initializers"
183 195
184# invalidate cached value if MAYBE_WARN has changed 196# invalidate cached value if MAYBE_WARN has changed
185if test "x$libdrm_cv_warn_maybe" != "x$MAYBE_WARN"; then 197if test "x$libdrm_cv_warn_maybe" != "x$MAYBE_WARN"; then
@@ -272,6 +284,9 @@ if test "x$drm_cv_atomic_primitives" = "xnone"; then
272 284
273 LIBDRM_ATOMICS_NOT_FOUND_MSG($TEGRA, tegra, NVIDIA Tegra, tegra-experimental-api) 285 LIBDRM_ATOMICS_NOT_FOUND_MSG($TEGRA, tegra, NVIDIA Tegra, tegra-experimental-api)
274 TEGRA=no 286 TEGRA=no
287
288 LIBDRM_ATOMICS_NOT_FOUND_MSG($ETNAVIV, etnaviv, Vivante, etnaviv-experimental-api)
289 ETNAVIV=no
275else 290else
276 if test "x$INTEL" = xauto; then 291 if test "x$INTEL" = xauto; then
277 case $host_cpu in 292 case $host_cpu in
@@ -294,6 +309,12 @@ else
294 *) FREEDRENO=no ;; 309 *) FREEDRENO=no ;;
295 esac 310 esac
296 fi 311 fi
312 if test "x$VC4" = xauto; then
313 case $host_cpu in
314 arm*|aarch64) VC4=yes ;;
315 *) VC4=no ;;
316 esac
317 fi
297fi 318fi
298 319
299if test "x$INTEL" != "xno"; then 320if test "x$INTEL" != "xno"; then
@@ -364,19 +385,23 @@ if test "x$RADEON" = xyes; then
364 AC_DEFINE(HAVE_RADEON, 1, [Have radeon support]) 385 AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
365fi 386fi
366 387
367# Detect cunit library 388if test "x$AMDGPU" != xno; then
368PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no]) 389 # Detect cunit library
369# If pkg-config does not find cunit, check it using AC_CHECK_LIB. We 390 PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
370# do this because Debian (Ubuntu) lacks pkg-config file for cunit. 391 # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
371# fixed in 2.1-2.dfsg-3: http://anonscm.debian.org/cgit/collab-maint/cunit.git/commit/?h=debian 392 # do this because Debian (Ubuntu) lacks pkg-config file for cunit.
372if test "x${have_cunit}" = "xno"; then 393 # fixed in 2.1-2.dfsg-3: http://anonscm.debian.org/cgit/collab-maint/cunit.git/commit/?h=debian
373 AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no]) 394 if test "x${have_cunit}" = "xno"; then
374 if test "x${have_cunit}" = "xyes"; then 395 AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no])
375 CUNIT_LIBS="-lcunit" 396 if test "x${have_cunit}" = "xyes"; then
376 CUNIT_CFLAGS="" 397 CUNIT_LIBS="-lcunit"
377 AC_SUBST([CUNIT_LIBS]) 398 CUNIT_CFLAGS=""
378 AC_SUBST([CUNIT_CFLAGS]) 399 AC_SUBST([CUNIT_LIBS])
400 AC_SUBST([CUNIT_CFLAGS])
401 fi
379 fi 402 fi
403else
404 have_cunit=no
380fi 405fi
381AM_CONDITIONAL(HAVE_CUNIT, [test "x$have_cunit" != "xno"]) 406AM_CONDITIONAL(HAVE_CUNIT, [test "x$have_cunit" != "xno"])
382 407
@@ -399,6 +424,15 @@ fi
399AM_CONDITIONAL(HAVE_ROCKCHIP, [test "x$ROCKCHIP" = xyes]) 424AM_CONDITIONAL(HAVE_ROCKCHIP, [test "x$ROCKCHIP" = xyes])
400if test "x$ROCKCHIP" = xyes; then 425if test "x$ROCKCHIP" = xyes; then
401 AC_DEFINE(HAVE_ROCKCHIP, 1, [Have ROCKCHIP support]) 426 AC_DEFINE(HAVE_ROCKCHIP, 1, [Have ROCKCHIP support])
427
428AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
429if test "x$VC4" = xyes; then
430 AC_DEFINE(HAVE_VC4, 1, [Have VC4 support])
431fi
432
433AM_CONDITIONAL(HAVE_ETNAVIV, [test "x$ETNAVIV" = xyes])
434if test "x$ETNAVIV" = xyes; then
435 AC_DEFINE(HAVE_ETNAVIV, 1, [Have etnaviv support])
402fi 436fi
403 437
404AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes]) 438AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes])
@@ -410,7 +444,9 @@ AC_ARG_ENABLE([cairo-tests],
410 [AS_HELP_STRING([--enable-cairo-tests], 444 [AS_HELP_STRING([--enable-cairo-tests],
411 [Enable support for Cairo rendering in tests (default: auto)])], 445 [Enable support for Cairo rendering in tests (default: auto)])],
412 [CAIRO=$enableval], [CAIRO=auto]) 446 [CAIRO=$enableval], [CAIRO=auto])
413PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) 447if test "x$CAIRO" != xno; then
448 PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
449fi
414AC_MSG_CHECKING([whether to enable Cairo tests]) 450AC_MSG_CHECKING([whether to enable Cairo tests])
415if test "x$CAIRO" = xauto; then 451if test "x$CAIRO" = xauto; then
416 CAIRO="$HAVE_CAIRO" 452 CAIRO="$HAVE_CAIRO"
@@ -424,13 +460,6 @@ fi
424AC_MSG_RESULT([$CAIRO]) 460AC_MSG_RESULT([$CAIRO])
425AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes]) 461AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes])
426 462
427# For enumerating devices in test case
428PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
429if test "x$HAVE_LIBUDEV" = xyes; then
430 AC_DEFINE(HAVE_LIBUDEV, 1, [Have libudev support])
431fi
432AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
433
434# xsltproc for docbook manpages 463# xsltproc for docbook manpages
435AC_ARG_ENABLE([manpages], 464AC_ARG_ENABLE([manpages],
436 AS_HELP_STRING([--enable-manpages], [enable manpages @<:@default=auto@:>@]), 465 AS_HELP_STRING([--enable-manpages], [enable manpages @<:@default=auto@:>@]),
@@ -455,7 +484,9 @@ AC_ARG_ENABLE(valgrind,
455 [AS_HELP_STRING([--enable-valgrind], 484 [AS_HELP_STRING([--enable-valgrind],
456 [Build libdrm with valgrind support (default: auto)])], 485 [Build libdrm with valgrind support (default: auto)])],
457 [VALGRIND=$enableval], [VALGRIND=auto]) 486 [VALGRIND=$enableval], [VALGRIND=auto])
458PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no]) 487if test "x$VALGRIND" != xno; then
488 PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
489fi
459AC_MSG_CHECKING([whether to enable Valgrind support]) 490AC_MSG_CHECKING([whether to enable Valgrind support])
460if test "x$VALGRIND" = xauto; then 491if test "x$VALGRIND" = xauto; then
461 VALGRIND="$have_valgrind" 492 VALGRIND="$have_valgrind"
@@ -508,6 +539,10 @@ AC_CONFIG_FILES([
508 tegra/libdrm_tegra.pc 539 tegra/libdrm_tegra.pc
509 rockchip/Makefile 540 rockchip/Makefile
510 rockchip/libdrm_rockchip.pc 541 rockchip/libdrm_rockchip.pc
542 vc4/Makefile
543 vc4/libdrm_vc4.pc
544 etnaviv/Makefile
545 etnaviv/libdrm_etnaviv.pc
511 tests/Makefile 546 tests/Makefile
512 tests/modeprint/Makefile 547 tests/modeprint/Makefile
513 tests/modetest/Makefile 548 tests/modetest/Makefile
@@ -521,6 +556,7 @@ AC_CONFIG_FILES([
521 tests/tegra/Makefile 556 tests/tegra/Makefile
522 tests/nouveau/Makefile 557 tests/nouveau/Makefile
523 tests/planetest/Makefile 558 tests/planetest/Makefile
559 tests/etnaviv/Makefile
524 tests/util/Makefile 560 tests/util/Makefile
525 man/Makefile 561 man/Makefile
526 libdrm.pc]) 562 libdrm.pc])
@@ -540,4 +576,6 @@ echo " EXYNOS API $EXYNOS"
540echo " Freedreno API $FREEDRENO (kgsl: $FREEDRENO_KGSL)" 576echo " Freedreno API $FREEDRENO (kgsl: $FREEDRENO_KGSL)"
541echo " Tegra API $TEGRA" 577echo " Tegra API $TEGRA"
542echo " Rockchip API $ROCKCHIP" 578echo " Rockchip API $ROCKCHIP"
579echo " VC4 API $VC4"
580echo " Etnaviv API $ETNAVIV"
543echo "" 581echo ""