> +# Check for Solaris fbconsole support
> +#
> +AC_MSG_CHECKING(for Solaris fbconsole)
> +if test -x /usr/X11/bin/fbconsole; then
> + AC_DEFINE(HAVE_FBCONSOLE)
> + AC_MSG_RESULT(yes)
> +else
> + AC_MSG_RESULT(no)
> +fi
That looks like it should be AC_CHECK_FILE, but it would probably be
even better to use AC_PATH_PROG, since we know fbconsole can be
in a couple different places (/usr/openwin/bin on S10 and older
Nevada builds, /usr/X11/bin on current nevada builds, possibly
/usr/bin in the future).
> +#ifdef HAVE_FBCONSOLE
> +#include <sys/vt.h>
> +#endif
If you're going to upstream, you'll also need to do an AC_CHECK_HEADERS
for sys/vt.h and only include that when it's present, since older
builds/releases won't have it.
> +#define FBCONSOLE "/usr/openwin/bin/fbconsole"
For OpenSolaris/current Nevada, /usr/X11/bin is preferred, so it doesn't
break if someone breaks the /usr/openwin -> /usr/X11 link by installing
a legacy SVR4 package - best would be using AC_PATH_PROG as noted above.
> + g_debug ("Running on console");
> + fd = open ("/dev/vt/0", O_WRONLY);
> + if (ioctl (fd, VT_ENABLED, &vtstat) == 0) {
> + g_debug ("VT is not enabled");
> + gdm_exec_fbconsole (server);
> + } else {
> + g_debug ("VT is enabled, so not forking
> fbconsole");
> + }
For upstreaming, it should also exec fbconsole if the previously mentioned
check for <sys/vt.h> was false.
--
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering