From bb4bc010232bad211c641384b2d1239364012353 Mon Sep 17 00:00:00 2001 From: "Zaki Mughal [sivoais]" Date: Sun, 2 Jan 2022 19:06:45 -0500 Subject: [PATCH] Test $no_x as well to detect AC_PATH_XTRA failure Co-authored-by: djerius --- configure.ac | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4efa3f4b80..14bc1fe785 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,22 @@ drivers="exdriv.lo pgdriv.lo cadriv.lo hgdriv.lo lxdriv.lo vtdriv.lo hidriv.lo dnl Not all platforms have X have_x11=no have_xt=no -AS_IF([ test "$with_x" != no ], +dnl +--------+------------------------+----------+----------+--------+-----+ +dnl |Variable| AC_PATH_XTRA |-without-x|-with-x=no|-with-x | --x | +dnl +--------+------------+-----------+----------+----------+--------+-----+ +dnl | | success | failure | | | | | +dnl +--------+------------+-----------+----------+----------+--------+-----+ +dnl | no_x | '' | 'yes' | 'yes' | | | | +dnl +--------+------------+-----------+----------+----------+--------+-----+ +dnl | with_x | | | 'no' | 'no' | 'yes' |'yes'| +dnl +--------+------------+-----------+----------+----------+--------+-----+ +dnl Notes: +dnl 1) AC_PATH_XTRA runs first and modifies no_x in the presence of -without-x +dnl 2) If --with-x is not specified, AC_PATH_XTRA assumes with_x='yes' +dnl +dnl Check pkg-config if the user did not forbid X and AC_PATH_XTRA failed to find it +AS_IF([ test "x$with_x" != xno -a "x$no_x" != x ], + [ PKG_CHECK_MODULES( [X11],