ftp://ftp.uni-heidelberg.de/pub/X11/contrib/applications/xscreensaver-1.27.tar.Z
[xscreensaver] / config.h
1 /* Config file for xscreensaver, Copyright (c) 1991-1996 Jamie Zawinski.
2  * This file is included by the various Imakefiles.
3  */
4
5 /*  Uncomment the following line if you have the XPM library installed.
6  *  Some of the demos can make use of this if it is available.
7  */
8 #define HAVE_XPM
9
10
11 /*  Uncomment the following line if you don't have Motif.  If you don't have
12  *  Motif, then the screensaver won't have any dialog boxes, which means
13  *  that it won't be compiled with support for demo-mode or display-locking.
14  *  But other than that, it will work fine.
15  */
16 /* #define NO_MOTIF */
17
18
19 /*  Uncomment the following line if for some reason the locking code doesn't
20  *  work (for example, if you don't have the crypt() system call, or if you
21  *  don't use standard passwd files.)  If you need to do this, please let me
22  *  know.
23  *
24  *  I'm told that locking doesn't work for sites which run AFS.  I don't know
25  *  anything about how one codes authentication for AFS; if you do, please let
26  *  me know...
27  */
28 /* #define NO_LOCKING */
29
30
31 /*  Select supported server extensions.
32  *  There are three distinct server extensions which are useful with 
33  *  XScreenSaver: XIDLE, MIT-SCREEN-SAVER, and SCREEN_SAVER.
34  *
35  *  The XIDLE extension resides in .../contrib/extensions/xidle/ on the X11R5
36  *  contrib tape.  This extension lets the client get accurate idle-time 
37  *  information from the X server in a potentially more reliable way than by
38  *  simply watching for keyboard and mouse activity.  However, the XIDLE 
39  *  extension has apparently not been ported to X11R6.
40  *
41  *  The SCREEN_SAVER extension is found (as far as I know) only in the SGI
42  *  X server, and it exists in all releases since (at least) Irix 5.  The
43  *  relevant header file is /usr/include/X11/extensions/XScreenSaver.h.
44  *
45  *  The similarly-named MIT-SCREEN-SAVER extension came into existence long
46  *  after the SGI SCREEN_SAVER extension was already in use, and resides in
47  *  .../contrib/extensions/screensaver/ on the X11R6 contrib tape.  It is
48  *  also found in certain recent X servers built in to NCD X terminals.
49  *
50  *     The MIT extension does basically the same thing that the XIDLE extension
51  *     does, but there are two things wrong with it: first, because of the way
52  *     the extension was designed, the `fade' option to XScreenSaver will be
53  *     uglier: just before the screen fades out, there will be an unattractive
54  *     flicker to black, because this extension blanks the screen *before*
55  *     telling us that it is time to do so.  Second, this extension is known to
56  *     be buggy; on the systems I use, it works, but some people have reported
57  *     X server crashes as a result of using it.  XScreenSaver uses this
58  *     extension rather conservatively, because when I tried to use any of its
59  *     more complicated features, I could get it to crash the server at the
60  *     drop of a hat.
61  *
62  *     In short, the MIT-SCREEN-SAVER extension is a piece of junk.  The older
63  *     SGI SCREEN_SAVER extension works great, as does XIDLE.  It would be nice
64  *     If those two existed on more systems, that is, would be adopted by the
65  *     X Consortium in favor of their inferior "not-invented-here" entry.
66  */
67
68 /*  Uncomment the following line if you have the XIDLE extension installed.
69  *  If you have the XIDLE extension, this is recommended.  (You have this
70  *  extension if the file /usr/include/X11/extensions/xidle.h exists.)
71  *  Turning on this flag lets XScreenSaver work better with servers which 
72  *  support this extension; but it will still work with servers which do not 
73  *  suport it, so it's a good idea to compile in support for it if you can.
74  */
75 /* #define HAVE_XIDLE_EXTENSION */
76
77 /*  Uncomment the following line if you have the MIT-SCREEN-SAVER extension
78  *  installed.  This is NOT RECOMMENDED.  See the caveats about this extension,
79  *  above.  (It's available if the file /usr/include/X11/extensions/scrnsaver.h
80  *  exists.)
81  */
82 /* #define HAVE_MIT_SAVER_EXTENSION */
83
84
85 /*  Use the following line if you have the SGI SCREEN_SAVER extension; the
86  *  default below should be correct (use it if and only if running on an SGI.)
87  *  Compiling in support for this extension is recommended, if possible.
88  */
89 #ifdef SGIArchitecture
90 # define HAVE_SGI_SAVER_EXTENSION
91 #endif
92
93
94 /*  Uncomment the following line if your system doesn't have the select()
95  *  system call.  If you need to do this, please let me know.  (I don't really
96  *  think that any such systems exist in this day and age...)
97  */
98 /* #define NO_SELECT */
99
100
101 /*  Uncomment the following line if your system doesn't have the setuid(),
102  *  setregid(), and getpwnam() library routines.
103  *
104  *  WARNING: if you do this, it will be unsafe to run xscreensaver as root
105  *  (which probably means you can't have it be started by xdm.)  If you are
106  *  on such a system, please try to find the corresponding way to do this,
107  *  and then tell me what it is.
108  */
109 /* #define NO_SETUID */
110
111
112 /*  Uncomment the following line if your system uses `shadow' passwords,
113  *  that is, the passwords live in /etc/shadow instead of /etc/passwd,
114  *  and one reads them with getspnam() instead of getpwnam().  (Note that
115  *  SCO systems do some random other thing; others might as well.  See the
116  *  ifdefs in driver/lock.c if you're having trouble related to reading
117  *  passwords.)
118  */
119 /* #define HAVE_SHADOW */
120
121
122 /*  You may need to edit these to correspond to where Motif is installed,
123  *  if your site has Motif installed in a nonstandard place.
124  */
125 #ifndef NO_MOTIF
126   MOTIFINCLUDES = -I/usr/local/include/
127  MOTIFLDOPTIONS = -L/usr/local/lib/
128       MOTIFLIBS = -lXm
129 #endif
130
131
132 /*  On some systems, only programs running as root can use the getpwent()
133     library routine.  This means that, in order for locking to work, the
134     screensaver must be installed as setuid to root.  Define this to make
135     that happen.  (You must run "make install" as root for it to work.)
136     (If your system needs this, and the default below is not correct,
137     please let me know.)
138  */
139 #if defined(HPArchitecture) || defined(AIXArchitecture) || defined(HAVE_SHADOW) || defined(NetBSDArchitecture)
140 # define INSTALL_SETUID
141 #endif
142
143 #ifdef HPArchitecture
144       CCOPTIONS = -Aa -D_HPUX_SOURCE    /* eat me */
145 # if (ProjectX <= 4)
146   MOTIFINCLUDES = -I/usr/include/Motif1.1
147  MOTIFLDOPTIONS = -L/usr/lib/Motif1.1
148 # else /* R5 */
149   MOTIFINCLUDES = -I/usr/include/Motif1.2
150  MOTIFLDOPTIONS = -L/usr/lib/Motif1.2
151 # endif /* R5 */
152 #endif /* HPArchitecture */
153
154 #ifdef MacIIArchitecture
155       CCOPTIONS = -D_POSIX_SOURCE
156 #endif /* MacIIArchitecture */
157
158 #if (ProjectX <= 4)
159 # define R5ISMS -DXPointer="char*"
160 #else /* r5 or better */
161 # define R5ISMS
162 #endif
163
164 /* It seems that some versions of Sun's dynamic X libraries are broken; if
165    you get link errors about _get_wmShellWidgetClass being undefined, try
166    adding -Bstatic to the link command.
167  */