configure.ac: ask Xserver SDK for config file installation dir

Using the new pkg-config variables, defined by recent Xlibre Xservers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-01-09 20:03:55 +01:00
parent 7f681ddbbc
commit 62ea8146bb
2 changed files with 7 additions and 39 deletions

View File

@@ -1,24 +1,3 @@
# Copyright 2015 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# on the rights to use, copy, modify, merge, publish, distribute, sub
# license, and/or sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if HAS_XORG_CONF_DIR
dist_config_DATA = 10-amdgpu.conf
endif
# install default xserver configuration snippet
drv_config_DATA = 10-amdgpu.conf
drv_configdir=@xlibre_conf_dir@

View File

@@ -60,6 +60,9 @@ PKG_PROG_PKG_CONFIG([0.25])
xlibre_video_drivers_dir=`$PKG_CONFIG xlibre-server --variable=video_drivers_dir`
AC_SUBST(xlibre_video_drivers_dir)
xlibre_conf_dir=`$PKG_CONFIG xlibre-server --variable=xserverconfigdir`
AC_SUBST(xlibre_conf_dir)
# Store the list of server defined optional extensions in REQUIRED_MODULES
XORG_DRIVER_CHECK_EXT(XV, videoproto)
@@ -71,20 +74,6 @@ PKG_CHECK_MODULES(GBM, [gbm])
# Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0 xproto fontsproto xf86driproto randrproto renderproto xextproto >= 7.0.99.1 $REQUIRED_MODULES])
# Section "OutputClass" is only supported as of xserver 1.16
PKG_CHECK_EXISTS([xorg-server >= 1.16],
[sysconfigdir=`$PKG_CONFIG --variable=sysconfigdir xorg-server`],
[sysconfigdir=""])
AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$sysconfigdir" != "x"])
# Define a configure option for an alternate X Server configuration directory
AC_ARG_WITH(xorg-conf-dir,
AS_HELP_STRING([--with-xorg-conf-dir=DIR],
[Default xorg.conf.d directory [[default=${prefix}/share/X11/xorg.conf.d]]]),
[configdir="$withval"],
[configdir='${prefix}/share/X11/xorg.conf.d'])
AC_SUBST(configdir)
AC_ARG_ENABLE([udev],
AS_HELP_STRING([--disable-udev], [Disable libudev support [default=auto]]),
[enable_udev="$enableval"],
@@ -127,8 +116,8 @@ echo " prefix: $prefix"
echo " exec_prefix: $exec_prefix"
echo " libdir: $libdir"
echo " includedir: $includedir"
echo " configdir: $configdir"
echo " video_drivers_dir: $xlibre_video_drivers_dir"
echo " xlibre_conf_dir: $xlibre_conf_dir"
echo ""
echo " CFLAGS: $CFLAGS"
echo " CXXFLAGS: $CXXFLAGS"