> Cc: emacs-devel@gnu.org, [EMAIL PROTECTED], [EMAIL PROTECTED]
> From: "Jan D." <[EMAIL PROTECTED]>
> Date: Wed, 13 Apr 2005 06:58:04 +0200
> 
> > But how do you check whether configure was invoked with `--without-x'
> > from Lisp and from C?
> 
> #ifndef HAVE_X_WINDOWS

Actually, I'd suggest

 #ifdef HAVE_WINDOW_SYSTEM

because the latter will catch non-X windowed versions (e.g.,
MS-Windows) as well.  Unless the code is in X-specific file, like
xfns.c, where non-X toolkits are a non-issue.

> You can check window-system in Lisp (it is nil), but it doesn't tell if 
> the running Emacs was configured with --without-x, only that it is 
> currently running without X.  I.e. it could be emacs -nw, or simply 
> running without an X display.  Does it make any difference?

Yes, it makes a difference: Emacs compiled with --without-x cannot
invoke code that calls X-specific primitives, because that would
signal errors complaining about void functions.  Emacs that does have
X support but runs with -nw will silently do nothing when such code is
invoked because (modulo bugs) these features are coded to do nothing
when the required graphic display facilities are not available.


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to