configure: Automatically detect the default xorg-module-dir.

The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
This commit is contained in:
b-aaz
2025-07-10 22:11:57 +00:00
committed by Enrico Weigelt
parent a90192a5b1
commit 8c99260b4f
2 changed files with 7 additions and 2 deletions

View File

@@ -18,6 +18,10 @@
# 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.
# During distcheck, system locations (as provided by pkg-config) may
# not be writable; provide instead relative locations.
DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules'
#Having problems passing through user flags as libtool complains
#ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
ACLOCAL_AMFLAGS = -I m4

View File

@@ -303,11 +303,12 @@ AM_CONDITIONAL(BUILD_TOOLS, test "x$tools" != "xno")
AM_CONDITIONAL(BUILD_TOOL_CURSOR, test "x$cursor" = "xyes")
# Define a configure option for an alternate module directory
PKG_PROG_PKG_CONFIG([0.25])
AC_ARG_WITH(xorg-module-dir,
AS_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[Default xorg module directory]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
[moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`])
AC_ARG_ENABLE(dri,
AS_HELP_STRING([--disable-dri],