Re: [gdm-list] Patches for multi-seat and multi-display support



Dan Nicholson wrote:
--- a/configure.ac
+++ b/configure.ac
@@ -175,6 +175,7 @@ dnl ---------------------------------------------------------------------------

 CK_BACKEND=""
 KVM_LIBS=""
+X11_DIR="/usr/bin"
 case "$host" in
         *-*-freebsd*)
         CK_BACKEND="freebsd"
@@ -189,11 +190,13 @@ case "$host" in
         ;;
         *-*-solaris*)
         CK_BACKEND="solaris"
+        X11_DIR="/usr/X11/bin"
         ;;
      *)
      AC_MSG_ERROR([No sysdeps back-end implemented for host $host])
      ;;
 esac
+AC_SUBST(X11_DIR)

 AC_SUBST(KVM_LIBS)
Can you figure out X11_DIR from pkg-config?

That would only work for Xorg, but you could do something like this:

X11_DIR=`$PKG_CONFIG --variable=bindir xorg-server 2>/dev/null`
if test "x$X11_DIR" = x; then
    AC_PATH_PROGS([XSERVER], [Xorg X],,[$PATH:/usr/X11/bin:/usr/bin])
    test "x$XSERVER" != x && X11_DIR=`dirname "$XSERVER"`
fi
test "x$X11_DIR" = x && X11_DIR=$bindir
AC_SUBST([X11_DIR])

But, wouldn't it be better to just get the name of the server itself
and let the user specify it if they want?

AC_ARG_WITH([xserver],
    [AS_HELP_STRING([--with-xserver=X], [specify X server to use])],
    [XSERVER=$withval])
if test "x$XSERVER" = x; then
    AC_PATH_PROGS([XSERVER], [Xorg X], [/usr/bin/X],
[$PATH:/usr/X11/bin:/usr/bin])
    test "x$XSERVER" = x && AC_MSG_ERROR([no X server found])
fi
AC_SUBST([XSERVER])

I'd imagine any distro/vendor would specify what they want, and anyone
doing fancy things like multiseat will be editing the configuration
files anyway.
Dan,

Thanks for your example code.

X11_DIR is used to substituted in data/display-types.conf.in. Take a look at this config file, Xorg/Xvnc/Xvfb need to be use full path.

Because these programs are delivered into different location for different distro. That's why we need X11_DIR here.

Your second way is to specify a XSERVER, what I want is a X11 programs directory. So the second way is not suitable.

You first patch is very good to use.

Thanks,
Halton.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]