summaryrefslogtreecommitdiffstats
path: root/build-aux/find-x-server.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:30:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:30:14 +0000
commitf38bddc70a6ec7c1ab26d9a8b06eed25d618ae22 (patch)
tree6437d0de9ba7fb9b0933a7c0eaa610a404d79e4e /build-aux/find-x-server.sh
parentInitial commit. (diff)
downloadgdm3-f38bddc70a6ec7c1ab26d9a8b06eed25d618ae22.tar.xz
gdm3-f38bddc70a6ec7c1ab26d9a8b06eed25d618ae22.zip
Adding upstream version 3.38.2.1.upstream/3.38.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xbuild-aux/find-x-server.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/build-aux/find-x-server.sh b/build-aux/find-x-server.sh
new file mode 100755
index 0000000..b5a8075
--- /dev/null
+++ b/build-aux/find-x-server.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# First check with "! -h" for /usr/X11R6 and /usr/X11 since they often
+# symlink to each other, and configure should use the more stable
+# location (the real directory) if possible.
+#
+# On Solaris, the /usr/bin/Xserver script is used to decide whether to
+# use Xsun or Xorg, so this is used on Solaris.
+#
+# When testing for /usr/X11R6, first check with "! -h" for /usr/X11R6
+# and /usr/X11 since they often symlink to each other, and configure
+# should use the more stable location (the real directory) if possible.
+#
+if test -x /usr/bin/X; then
+ echo "/usr/bin/X"
+elif test -x /usr/X11/bin/Xserver; then
+ echo "/usr/X11/bin/Xserver"
+elif test ! -h /usr/X11R6 -a -x /usr/X11R6/bin/X; then
+ echo "/usr/X11R6/bin/X"
+elif test ! -h /usr/X11 -a -x /usr/X11/bin/X; then
+ echo "/usr/X11/bin/X"
+elif test -x /usr/X11R6/bin/X; then
+ echo "/usr/X11R6/bin/X"
+elif test -x /usr/bin/Xorg; then
+ echo "/usr/bin/Xorg"
+elif test -x /usr/X11/bin/X; then
+ echo "/usr/X11/bin/X"
+elif test -x /usr/openwin/bin/Xsun; then
+ echo "/usr/openwin/bin/Xsun"
+elif test -x /opt/X11R6/bin/X; then
+ echo "/opt/X11R6/bin/X"
+else
+ echo ""
+fi