17517dc801f3f5a2da4cc2c635bd5be9a6d81355
[xscreensaver] / config.h
1 /*
2  * Config file for xscreensaver, Copyright (c) 1991-1995 Jamie Zawinski.
3  * This file is included by the various Imakefiles.
4  */
5
6 /*  Uncomment the following line if you have the XIDLE extension installed.
7  *  This extension resides in .../contrib/extensions/xidle/ on the X11R5
8  *  contrib tape.  (Turning on this flag lets XScreenSaver work better with
9  *  servers which support this extension; but it will still work with servers
10  *  which do not suport this extension, so it's a good idea to compile in
11  *  support for it if you can.)
12  */
13 /* #define HAVE_XIDLE_EXTENSION */
14
15 /*  Uncomment the following line if you have the MIT-SCREEN-SAVER extension
16  *  installed.  This extension resides in .../contrib/extensions/screensaver/
17  *  on the X11R6 contrib tape.
18  *
19  *  This extension does basically the same thing that the XIDLE extension does,
20  *  but there are two things wrong with it: first, because of the way the 
21  *  extension was designed, the `fade' option to XScreenSaver will be uglier:
22  *  just before the screen fades out, there will be an unattractive flicker to
23  *  black, because this extension blanks the screen *before* telling us that it
24  *  is time to do so.  Second, this extension is known to be buggy; on the
25  *  systems I use, it works, but some people have reported X server crashes as
26  *  a result of using it.  XScreenSaver uses this extension rather
27  *  conservatively, because when I tried to use any of its more complicated
28  *  features, I could get it to crash the server at the drop of a hat.
29  *
30  *  I wish someone would port the XIDLE extension to R6.  Or I wish someone
31  *  would make the MIT-SCREEN-SAVER extension not be such a piece of junk.
32  *
33  *  Note that the SGI X server also has an extension called SCREEN_SAVER.
34  *  That is a completely different extension, and XScreenSaver contains no
35  *  support for it (though it probably wouldn't be hard.)
36  */
37 /* #define HAVE_SAVER_EXTENSION */
38
39 /*  Uncomment the following line if you have the XPM library installed.
40  *  Some of the demos can make use of this if it is available.
41  */
42 #define HAVE_XPM
43
44 /*  Uncomment the following line if you don't have Motif.  If you don't have
45  *  Motif, then the screensaver won't have any dialog boxes, which means
46  *  that it won't be compiled with support for demo-mode or display-locking.
47  *  But other than that, it will work fine.
48  */
49 /* #define NO_MOTIF */
50
51 /*  Uncomment the following line if for some reason the locking code doesn't
52  *  work (for example, if you don't have the crypt() system call, or if you
53  *  don't use standard passwd files.)  If you need to do this, please let me
54  *  know.
55  */
56 /* #define NO_LOCKING */
57
58 /*  Uncomment the following line if your system doesn't have the select()
59  *  system call.  If you need to do this, please let me know.
60  */
61 /* #define NO_SELECT */
62
63 /*  Uncomment the following line if your system doesn't have the setuid(),
64  *  setregid(), and getpwnam() library routines.
65  *
66  *  WARNING: if you do this, it will be unsafe to run xscreensaver as root
67  *  (which probably means you can't have it be started by xdm.)  If you are
68  *  on such a system, please try to find the corresponding way to do this,
69  *  and then tell me what it is.
70  */
71 /* #define NO_SETUID */
72
73 /*  Uncomment the following line if your system uses `shadow' passwords,
74  *  that is, the passwords live in /etc/shadow instead of /etc/passwd,
75  *  and one reads them with getspnam() instead of getpwnam().
76  */
77 /* #define HAVE_SHADOW */
78
79 /*  You may need to edit these to correspond to where Motif is installed.
80  */
81 #ifndef NO_MOTIF
82   MOTIFINCLUDES = -I/usr/local/include/
83  MOTIFLDOPTIONS = -L/usr/local/lib/
84       MOTIFLIBS = -lXm
85 #endif
86
87 /*  On some systems, only programs running as root can use the getpwent()
88     library routine.  This means that, in order for locking to work, the
89     screensaver must be installed as setuid to root.  Define this to make
90     that happen.  (You must run "make install" as root for it to work.)
91     (What systems other than HP and AIX need this?  Let me know.)
92  */
93 #if defined(HPArchitecture) || defined(AIXArchitecture) || defined(HAVE_SHADOW)
94 # define INSTALL_SETUID
95 #endif
96
97 #ifdef HPArchitecture
98       CCOPTIONS = -Aa -D_HPUX_SOURCE    /* eat me */
99 # if (ProjectX <= 4)
100   MOTIFINCLUDES = -I/usr/include/Motif1.1
101  MOTIFLDOPTIONS = -L/usr/lib/Motif1.1
102 # else /* R5 */
103   MOTIFINCLUDES = -I/usr/include/Motif1.2
104  MOTIFLDOPTIONS = -L/usr/lib/Motif1.2
105 # endif /* R5 */
106 #endif /* HPArchitecture */
107
108 #ifdef MacIIArchitecture
109       CCOPTIONS = -D_POSIX_SOURCE
110 #endif /* MacIIArchitecture */
111
112 #if (ProjectX <= 4)
113 # define R5ISMS -DXPointer="char*"
114 #else /* r5 or better */
115 # define R5ISMS
116 #endif
117
118 /* It seems that some versions of Sun's dynamic X libraries are broken; if
119    you get link errors about _get_wmShellWidgetClass being undefined, try
120    adding -Bstatic to the link command.
121  */