From 1c1f95edf997d2b1d9281f28c9a57c0eaf53097f Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Dec 2025 18:57:09 +0100 Subject: [PATCH] configure.ac: formatting cleanup Signed-off-by: Enrico Weigelt, metux IT consult --- configure.ac | 122 ++++++++++++++++++++++++--------------------------- 1 file changed, 58 insertions(+), 64 deletions(-) diff --git a/configure.ac b/configure.ac index 2b4e7ae..a667a89 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], [DRI=auto]) AC_ARG_ENABLE(exa, AS_HELP_STRING([--disable-exa], - [Disable EXA support [[default=enabled]]]), + [Disable EXA support [[default=enabled]]]), [EXA="$enableval"], [EXA=yes]) @@ -78,43 +78,43 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. if test "$DRI" != no; then - if test -f "${sdkdir}/dri.h"; then - have_dri_h="yes" - else - have_dri_h="no" - fi - if test -f "${sdkdir}/sarea.h"; then - have_sarea_h="yes" - else - have_sarea_h="no" - fi - if test -f "${sdkdir}/dristruct.h"; then - have_dristruct_h="yes" - else - have_dristruct_h="no" - fi - if test -f "${sdkdir}/damage.h"; then - have_damage_h="yes" - else - have_damage_h="no" - fi + if test -f "${sdkdir}/dri.h"; then + have_dri_h="yes" + else + have_dri_h="no" + fi + if test -f "${sdkdir}/sarea.h"; then + have_sarea_h="yes" + else + have_sarea_h="no" + fi + if test -f "${sdkdir}/dristruct.h"; then + have_dristruct_h="yes" + else + have_dristruct_h="no" + fi + if test -f "${sdkdir}/damage.h"; then + have_damage_h="yes" + else + have_damage_h="no" + fi fi AC_MSG_CHECKING([whether to include DRI support]) if test x$DRI = xauto; then - if test "$have_dri_h" = yes -a \ + if test "$have_dri_h" = yes -a \ "$have_sarea_h" = yes -a \ "$have_dristruct_h" = yes; then - DRI="yes" - else - DRI="no" - fi + DRI="yes" + else + DRI="no" + fi fi AC_MSG_RESULT([$DRI]) AM_CONDITIONAL(DRI, test x$DRI = xyes) if test "$DRI" = yes; then - PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto]) + PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto]) AC_DEFINE(R128DRI,1,[Enable DRI driver support]) AC_DEFINE(R128DRI_DEVEL,1,[Enable developmental DRI driver support]) fi @@ -159,10 +159,10 @@ AC_CHECK_HEADERS([dev/wscons/wsconsio.h]) # Checks for headers/macros for byte swapping # Known variants: -# bswap_16, bswap_32, bswap_64 (glibc) -# __swap16, __swap32, __swap64 (OpenBSD) -# bswap16, bswap32, bswap64 (other BSD's) -# and a fallback to local macros if none of the above are found +# bswap_16, bswap_32, bswap_64 (glibc) +# __swap16, __swap32, __swap64 (OpenBSD) +# bswap16, bswap32, bswap64 (other BSD's) +# and a fallback to local macros if none of the above are found # if is found, assume it's the correct version AC_CHECK_HEADERS([byteswap.h]) @@ -171,8 +171,8 @@ AC_CHECK_HEADERS([byteswap.h]) AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"]) if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then - AC_MSG_CHECKING([for __swap16 variant of byteswapping macros]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([ + AC_MSG_CHECKING([for __swap16 variant of byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ], [ @@ -180,10 +180,10 @@ int a = 1, b; b = __swap16(a); ]) ], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no']) - AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) + AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) - AC_MSG_CHECKING([for bswap16 variant of byteswapping macros]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([ + AC_MSG_CHECKING([for bswap16 variant of byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ], [ @@ -191,39 +191,33 @@ int a = 1, b; b = bswap16(a); ]) ], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no']) - AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) + AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) - if test "$SYS_ENDIAN_BSWAP" = "yes" ; then - USE_SYS_ENDIAN_H=yes - BSWAP=bswap - else - if test "$SYS_ENDIAN__SWAP" = "yes" ; then - USE_SYS_ENDIAN_H=yes - BSWAP=__swap - else - USE_SYS_ENDIAN_H=no - fi - fi + if test "$SYS_ENDIAN_BSWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=bswap + else + if test "$SYS_ENDIAN__SWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=__swap + else + USE_SYS_ENDIAN_H=no + fi + fi - if test "$USE_SYS_ENDIAN_H" = "yes" ; then - AC_DEFINE([USE_SYS_ENDIAN_H], 1, - [Define to use byteswap macros from ]) - AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, - [Define to 16-bit byteswap macro]) - AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, - [Define to 32-bit byteswap macro]) - AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, - [Define to 64-bit byteswap macro]) - fi + if test "$USE_SYS_ENDIAN_H" = "yes" ; then + AC_DEFINE([USE_SYS_ENDIAN_H], 1, + [Define to use byteswap macros from ]) + AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, + [Define to 16-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, + [Define to 32-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, + [Define to 64-bit byteswap macro]) + fi fi AC_SUBST([moduledir]) -AC_MSG_NOTICE( -[Please change the Driver line in xorg.conf from "ati" to "r128" or install] -[the ati wrapper as well:] -[ https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati] -) - AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) AC_OUTPUT