From 3f438031d610c7e15fd33876a879b97e290e05fb Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Mon, 2 Mar 2009 00:43:32 -0500 Subject: [PATCH] ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-4.22.tar.gz -rw-r--r-- 1 zblaxell zblaxell 4620066 Sep 4 2005 xscreensaver-4.22.tar.gz f40db41ef221f7ed42c39e77007ce05b4f846306 xscreensaver-4.22.tar.gz --- Makefile.in | 7 +- README | 11 + config.h.in | 701 +-- configure | 278 +- configure.in | 366 +- driver/Makefile.in | 58 +- driver/XScreenSaver.ad.in | 12 +- driver/XScreenSaver_ad.h | 17 +- driver/dpms.c | 136 +- driver/lock.c | 28 +- driver/passwd-helper.c | 20 +- driver/passwd-kerberos.c | 4 +- driver/prefs.c | 4 +- driver/setuid.c | 62 +- driver/subprocs.c | 2 +- driver/test-uid.c | 30 +- driver/timers.c | 18 +- driver/windows.c | 2 +- driver/xscreensaver-command.c | 5 +- driver/xscreensaver-command.man | 8 +- driver/xscreensaver-demo.glade2 | 2 +- driver/xscreensaver-demo.man | 2 +- driver/xscreensaver-text | 81 +- driver/xscreensaver.c | 2 +- driver/xscreensaver.man | 177 +- driver/xset.c | 124 +- hacks/Makefile.in | 120 +- hacks/analogtv.c | 2 +- hacks/anemotaxis.man | 2 +- hacks/attraction.man | 4 +- hacks/bsod.c | 295 +- hacks/bsod.man | 6 +- hacks/bumps.man | 15 +- hacks/cloudlife.c | 22 +- hacks/compile_axp.com | 2 + hacks/compile_decc.com | 2 + hacks/config/README | 4 +- hacks/config/antmaze.xml | 18 + hacks/config/blinkbox.xml | 9 +- hacks/config/boxed.xml | 5 +- hacks/config/bsod.xml | 1 + hacks/config/bubble3d.xml | 3 +- hacks/config/cage.xml | 5 +- hacks/config/cloudlife.xml | 2 +- hacks/config/crackberg.xml | 46 + hacks/config/fireworkx.xml | 16 +- hacks/config/flipflop.xml | 2 +- hacks/config/glblur.xml | 5 - hacks/config/hyperball.xml | 2 + hacks/config/hypertorus.xml | 4 +- hacks/config/interaggregate.xml | 27 + hacks/config/lmorph.xml | 2 +- hacks/config/penrose.xml | 4 - hacks/config/polytopes.xml | 4 +- hacks/config/providence.xml | 7 +- hacks/config/queens.xml | 5 +- hacks/config/tangram.xml | 22 + hacks/decayscreen.man | 2 +- hacks/demon.man | 2 +- hacks/discrete.c | 2 +- hacks/drift.man | 2 +- hacks/fiberlamp.c | 23 +- hacks/fiberlamp.man | 2 +- hacks/fireworkx.c | 271 +- hacks/fireworkx.man | 39 +- hacks/fireworkx_mmx.S | 226 + hacks/flow.c | 2 +- hacks/fuzzyflakes.man | 4 +- hacks/glx/Makefile.in | 76 +- hacks/glx/antinspect.c | 3 +- hacks/glx/antmaze.c | 1512 ++++++ hacks/glx/antmaze.man | 57 + hacks/glx/b_draw.c | 47 +- hacks/glx/b_lockglue.c | 58 +- hacks/glx/blinkbox.c | 56 +- hacks/glx/blinkbox.man | 6 +- hacks/glx/boxed.c | 75 +- hacks/glx/bubble3d.c | 17 + hacks/glx/bubble3d.h | 7 +- hacks/glx/bubble3d.man | 9 + hacks/glx/cage.c | 36 +- hacks/glx/cage.man | 12 +- hacks/glx/crackberg.c | 1384 +++++ hacks/glx/crackberg.man | 123 + hacks/glx/endgame.c | 59 +- hacks/glx/endgame.man | 16 +- hacks/glx/extrusion.c | 19 +- hacks/glx/extrusion.man | 4 +- hacks/glx/flipscreen3d.man | 4 + hacks/glx/fliptext.c | 47 +- hacks/glx/gflux.c | 1 + hacks/glx/gflux.man | 7 +- hacks/glx/glblur.c | 8 +- hacks/glx/glblur.man | 4 - hacks/glx/glmatrix.man | 5 + hacks/glx/glsnake.man | 4 +- hacks/glx/gltext.man | 17 +- hacks/glx/hypertorus.c | 5 +- hacks/glx/hypertorus.man | 4 +- hacks/glx/klein.c | 5 +- hacks/glx/moebius.c | 3 +- hacks/glx/molecule.man | 11 +- hacks/glx/morph3d.man | 2 +- hacks/glx/pinion.man | 5 + hacks/glx/polyhedra-gl.c | 5 +- hacks/glx/polyhedra.man | 1 + hacks/glx/polytopes.c | 7 +- hacks/glx/polytopes.man | 8 +- hacks/glx/providence.c | 8 +- hacks/glx/providence.man | 14 +- hacks/glx/queens.man | 13 +- hacks/glx/sphere.c | 2 +- hacks/glx/stairs.c | 5 +- hacks/glx/tangram.c | 1248 +++++ hacks/glx/tangram.man | 59 + hacks/glx/tangram_shapes.c | 201 + hacks/glx/tangram_shapes.h | 15 + hacks/hyperball.man | 20 +- hacks/ifs.c | 515 +- hacks/interaggregate.c | 932 ++++ hacks/interaggregate.man | 72 + hacks/intermomentary.c | 5 +- hacks/juggle.c | 2 +- hacks/lisa.man | 4 +- hacks/lmorph.man | 4 +- hacks/loop.c | 2 +- hacks/maze.c | 4 +- hacks/munch.man | 4 +- hacks/pacman_level.c | 2 +- hacks/penetrate.man | 2 +- hacks/phosphor.c | 2 +- hacks/qix.man | 2 +- hacks/rd-bomb.c | 3 +- hacks/rotzoomer.man | 2 +- hacks/slidescreen.c | 73 +- hacks/slidescreen.man | 17 +- hacks/sonar.c | 15 +- hacks/sonar.man | 2 +- hacks/speedmine.c | 2 +- hacks/starfish.man | 2 +- hacks/substrate.c | 5 +- hacks/t3d.man | 2 +- hacks/thornbird.c | 2 +- hacks/truchet.man | 2 +- hacks/vidwhacker | 83 +- hacks/vidwhacker.man | 2 +- hacks/webcollage | 209 +- hacks/webcollage.man | 2 +- hacks/whirlwindwarp.c | 359 +- hacks/whirlwindwarp.man | 4 +- hacks/whirlygig.man | 4 +- hacks/xlyap.man | 2 +- hacks/xml2man.pl | 18 +- hacks/xscreensaver-sgigl.c | 12 +- hacks/xteevee.man | 4 +- hacks/zoom.c | 4 +- hacks/zoom.man | 6 +- install-sh | 0 po/Makefile.in.in | 3 +- po/POTFILES.in | 20 +- po/de.po | 4 +- po/hu.po | 6175 +++++++++++----------- po/it.po | 4141 ++++++++------- po/nb.po | 8657 +++++++++++++++++++++++++++++++ setup.com | 5 +- utils/ad2c | 0 utils/fade.c | 2 +- utils/version.h | 2 +- xscreensaver.spec | 28 +- 169 files changed, 23363 insertions(+), 6771 deletions(-) create mode 100644 hacks/config/antmaze.xml create mode 100644 hacks/config/crackberg.xml create mode 100644 hacks/config/interaggregate.xml create mode 100644 hacks/config/tangram.xml create mode 100644 hacks/fireworkx_mmx.S create mode 100644 hacks/glx/antmaze.c create mode 100644 hacks/glx/antmaze.man create mode 100644 hacks/glx/crackberg.c create mode 100644 hacks/glx/crackberg.man create mode 100644 hacks/glx/tangram.c create mode 100644 hacks/glx/tangram.man create mode 100644 hacks/glx/tangram_shapes.c create mode 100644 hacks/glx/tangram_shapes.h create mode 100644 hacks/interaggregate.c create mode 100644 hacks/interaggregate.man mode change 100755 => 100644 install-sh create mode 100644 po/nb.po mode change 100755 => 100644 utils/ad2c diff --git a/Makefile.in b/Makefile.in index 24e9cb72..2ae53caf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -41,6 +41,8 @@ depend:: distdepend:: @$(MAKE) update_spec_version @$(MAKE_SUBDIR) + @cd po ; $(MAKE) generate_potfiles_in + TAGS:: tags tags:: @$(MAKE_SUBDIR) @@ -60,7 +62,7 @@ tar:: $(MAKE) configure ; \ $(MAKE) distdepend ; \ NAME=`sed -n \ - 's/[^0-9]*\([0-9]\.[0-9][0-9]*b\?[0-9]*\).*/xscreensaver-\1/p' \ + 's/[^0-9]*\([0-9]\.[0-9][0-9]*[0-9]*\).*/xscreensaver-\1/p' \ utils/version.h` ; \ rm -rf $$NAME ; ln -s . $$NAME ; \ FILES= ; \ @@ -88,6 +90,7 @@ tar:: # configure:: autoconf + autoheader @TMP=configure.$$$$ ; \ echo "munging configure's --help message..." ; \ ( perl -e ' \ @@ -112,6 +115,8 @@ configure:: --x-includes=DIR X include files are in DIR\n \ --x-libraries=DIR X library files are in DIR/m; \ \ + s@mandir=.\$${prefix}/man.@mandir=\\\$${datadir}/man@; \ + \ print;' \ < configure \ > $$TMP && \ diff --git a/README b/README index e8221eca..beac235b 100644 --- a/README +++ b/README @@ -76,6 +76,17 @@ the XScreenSaver FAQ about that: http://www.jwz.org/xscreensaver/faq.html ============ +Changes since 4.21: * Fixed a bug in the new mouse-motion code that caused + the screen to never blank on multi-head non-Xinerama + systems. Oops. + * New hacks, `interaggregate', `antmaze', `tangram', + and `crackberg'. + * Minor tweaks to `fiberlamp', `ifs', `slidescreen', + `zoom', `sonar', `fireworkx', `whirlwindwarp', + `bubble3d', and `rd-bomb'. + * Added motion blur to `blinkbox'. + * `bsod' now includes Longhorn's "RSOD", and OS/2. + * Fixed `-wireframe' usage in most hacks and man pages. Changes since 4.20: * New hack: `fliptext'. * Changed default configure installation directories: /usr/bin/ for xscreensaver, etc.; diff --git a/config.h.in b/config.h.in index 0a62ee15..59a6ccf9 100644 --- a/config.h.in +++ b/config.h.in @@ -1,3 +1,6 @@ +/* config.h.in. Generated from configure.in by autoheader. */ + + /* config.h.in --- xscreensaver, Copyright (c) 1998-2000 Jamie Zawinski. * * The best way to set these parameters is by running the included `configure' @@ -9,430 +12,472 @@ */ -/* ************************************************************************* - CONFIGURING SERVER EXTENSIONS - ************************************************************************* */ +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END -/* Define this if you have the XReadDisplay extension (I think this is an - SGI-only thing; it's in .) A few of the - screenhacks will take advantage of this if it's available. - */ -#undef HAVE_READ_DISPLAY_EXTENSION +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA -/* Define this if you have the XHPDisableReset function (an HP only thing - which allows the Ctrl-Sh-Reset key sequence to be temporarily disabled.) - */ -#undef HAVE_XHPDISABLERESET +/* always defined to indicate that i18n is enabled */ +#undef ENABLE_NLS -/* First, some background: there are three distinct server extensions which - * are useful to a screen saver program: they are XIDLE, MIT-SCREEN-SAVER, - * and SCREEN_SAVER. - * - * The XIDLE extension resides in .../contrib/extensions/xidle/ on the X11R5 - * contrib tape. This extension lets the client get accurate idle-time - * information from the X server in a potentially more reliable way than by - * simply watching for keyboard and mouse activity. However, the XIDLE - * extension has apparently not been ported to X11R6. - * - * The SCREEN_SAVER extension is found (as far as I know) only in the SGI - * X server, and it exists in all releases since (at least) Irix 5. The - * relevant header file is /usr/include/X11/extensions/XScreenSaver.h. - * - * The similarly-named MIT-SCREEN-SAVER extension came into existence long - * after the SGI SCREEN_SAVER extension was already in use, and resides in - * .../contrib/extensions/screensaver/ on the X11R6 contrib tape. It is - * also found in certain recent X servers built in to NCD X terminals. - * - * The MIT extension does basically the same thing that the XIDLE extension - * does, but there are two things wrong with it: first, because of the way - * the extension was designed, the `fade' option to XScreenSaver will be - * uglier: just before the screen fades out, there will be an unattractive - * flicker to black, because this extension blanks the screen *before* - * telling us that it is time to do so. Second, this extension is known to - * be buggy; on the systems I use, it works, but some people have reported - * X server crashes as a result of using it. XScreenSaver uses this - * extension rather conservatively, because when I tried to use any of its - * more complicated features, I could get it to crash the server at the - * drop of a hat. - * - * In short, the MIT-SCREEN-SAVER extension is a piece of junk. The older - * SGI SCREEN_SAVER extension works great, as does XIDLE. It would be nice - * If those two existed on more systems, that is, would be adopted by the - * X Consortium in favor of their inferior "not-invented-here" entry. - */ +/* Some screenhacks like to run an external program to generate random pieces + of text; set this to the one you like. Note that this is just the default; + X resources can be used to override it. */ +#undef FORTUNE_PROGRAM -/* Define this if you have the XIDLE extension installed. If you have the - * XIDLE extension, this is recommended. (You have this extension if the - * file /usr/include/X11/extensions/xidle.h exists.) Turning on this flag - * lets XScreenSaver work better with servers which support this extension; - * but it will still work with servers which do not suport it, so it's a good - * idea to compile in support for it if you can. - */ -#undef HAVE_XIDLE_EXTENSION +/* This is the name of the gettext package to use. */ +#undef GETTEXT_PACKAGE -/* Define this if you have the SGI SCREEN_SAVER extension. This is standard - * on Irix systems, and not available elsewhere. - */ -#undef HAVE_SGI_SAVER_EXTENSION +/* Define this if gettimeofday() takes two arguments. */ +#undef GETTIMEOFDAY_TWO_ARGS -/* Define this if you have the SGI-VIDEO-CONTROL extension. This is standard - * on Irix systems, and not available elsewhere. - */ -#undef HAVE_SGI_VC_EXTENSION +/* Define this if your system is Solaris with ``adjunct'' passwords (this is + the version where one gets at the passwords with getpwanam() instead of + getpwnam().) I haven't tested this one, let me know if it works. */ +#undef HAVE_ADJUNCT_PASSWD -/* Define this if you have the XDPMS extension. This is standard on - * sufficiently-recent XFree86 systems, and possibly elsewhere. (It's - * available if the file /usr/include/X11/extensions/dpms.h exists.) - */ +/* Define to 1 if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define this if you have Gnome and want to build support for the + xscreensaver control panel in the Gnome Control Center (gnomecc). (This is + needed only with Gtk 1.x.) */ +#undef HAVE_CRAPPLET + +/* Define this if HAVE_CRAPPLET is defined, and the function + capplet_widget_changes_are_immediate() is available. */ +#undef HAVE_CRAPPLET_IMMEDIATE + +/* Define to 1 if you have the header file. */ +#undef HAVE_CRYPT_H + +/* Define to 1 if you have the `dcgettext' function. */ +#undef HAVE_DCGETTEXT + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define this if you have the X Double Buffer Extension. */ +#undef HAVE_DOUBLE_BUFFER_EXTENSION + +/* Define this if you have the XDPMS extension. This is standard on + sufficiently-recent XFree86 systems, and possibly elsewhere. (It's + available if the file /usr/include/X11/extensions/dpms.h exists.) */ #undef HAVE_DPMS_EXTENSION -/* Define this if you have the functions XF86VidModeGetModeLine() and - * XF86VidModeGetViewPort(), in support of virtual desktops where the - * X server's root window is bigger than the actual screen. This is - * an XFree86 thing, and probably doesn't exist elsewhere. (It's - * available if the file /usr/include/X11/extensions/xf86vmode.h exists.) - */ -#undef HAVE_XF86VMODE +/* Define this if your system is Digital or SCO Unix with so-called ``Enhanced + Security'', that is, the passwords live in /tcb/files/auth// + instead of in /etc/passwd, and one reads them with getprpwnam() instead of + getpwnam(). */ +#undef HAVE_ENHANCED_PASSWD -/* Define this if you have the functions XF86VidModeGetGamma() and - * XF86VidModeSetGamma(), which allow clients to change the gamma - * response of the monitor. This is an XFree86 4.0.x thing, and - * probably doesn't exist elsewhere. (It's available if the file - * /usr/include/X11/extensions/xf86vmode.h exists and has stuff about - * gamma in it.) - */ -#undef HAVE_XF86VMODE_GAMMA +/* Define to 1 if you have the `fcntl' function. */ +#undef HAVE_FCNTL -/* Define this if you have the functions XF86VidModeGetGammaRamp() and - * XF86VidModeSetGammaRamp(), which provide finer-grained control than - * XF86VidMode[GS]etGamma(). These appeared in XFree86 4.1.0. - */ -#undef HAVE_XF86VMODE_GAMMA_RAMP +/* Define this if you have the 'forkpty' function: This allows 'phosphor' and + 'apple2' to run curses-based programs, or be used as terminal windows. */ +#undef HAVE_FORKPTY -/* Define this if you have the Xinerama extension. This is standard on - * sufficiently-recent XFree86 systems, and possibly elsewhere. (It's - * available if the file /usr/include/X11/extensions/Xinerama.h exists.) - */ -#undef HAVE_XINERAMA +/* Define this if you have the GDK_Pixbuf library installed. Some of the demos + can make use of this if it is available. */ +#undef HAVE_GDK_PIXBUF -/* Define this if you have the Resize and Rotate extension. This is standard - * on sufficiently-recent XFree86 systems, and possibly elsewhere. (It's - * available if the file /usr/include/X11/extensions/Xrandr.h exists.) - */ -#undef HAVE_RANDR +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD -/* Define this if you have the XF86MiscSetGrabKeysState function (which allows - the Ctrl-Alt-KP_star and Ctrl-Alt-KP_slash key sequences to be temporarily - disabled. Sadly, it doesn't affect Ctrl-Alt-BS or Ctrl-Alt-F1.) - */ -#undef HAVE_XF86MISCSETGRABKEYSSTATE +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE -/* Define this if you have a Linux-like /proc/interrupts file which can be - * examined to determine when keyboard activity has occurred. - */ -#undef HAVE_PROC_INTERRUPTS +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT +/* Define this if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY +/* Define to 1 if you have the `getwd' function. */ +#undef HAVE_GETWD -/* ************************************************************************* - CONFIGURING GRAPHICS TOOLKITS - ************************************************************************* */ +/* Define this if you have OpenGL. Some of the demos require it, so if you + don't have it, then those particular demos won't be built. (This won't + affect the screen saver as a whole.) */ +#undef HAVE_GL -/* Define this if you have Motif. - */ -#undef HAVE_MOTIF +/* Define this if your version of OpenGL has the glBindTexture() routine. This + is the case for OpenGL 1.1, but not for OpenGL 1.0. */ +#undef HAVE_GLBINDTEXTURE -/* Define this if you have the XmComboBox Motif widget (Motif 2.0.) - */ -#undef HAVE_XMCOMBOBOX +/* Define this if you have the -lgle and -lmatrix libraries (GL extrusion.) */ +#undef HAVE_GLE -/* Define this if you have Gtk (any version.) - */ +/* Define this if you have the -lgle from GLE version 3 */ +#undef HAVE_GLE3 + +/* Define this if you have Gtk (any version.) */ #undef HAVE_GTK -/* Define this if you have Gtk 2.x. - */ +/* Define this if you have Gtk 2.x. */ #undef HAVE_GTK2 -/* Define this if you have Gnome and want to build support for the - xscreensaver control panel in the Gnome Control Center (gnomecc). - (This is needed only with Gtk 1.x.) - */ -#undef HAVE_CRAPPLET +/* Define this if you are running HPUX with so-called ``Secure Passwords'' (if + you have /usr/include/hpsecurity.h, you probably have this.) I haven't + tested this one, let me know if it works. */ +#undef HAVE_HPUX_PASSWD -/* Define this if HAVE_CRAPPLET is defined, and the function - capplet_widget_changes_are_immediate() is available. - */ -#undef HAVE_CRAPPLET_IMMEDIATE +/* Define this if you do pings with a `struct icmp' and an `icmp_id' slot. */ +#undef HAVE_ICMP -/* Define this if you have the XML library. - */ -#undef HAVE_XML +/* Define this if you do pings with a `struct icmphdr' and an `un.echo.id' + slot. */ +#undef HAVE_ICMPHDR -/* Define this if you have the XML library headers in their old, - * non-namespaced location (you lack the gnome-xml/libxml symlink) - */ -#undef HAVE_OLD_XML_HEADERS +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H -/* Define this if you have the XPM library installed. Some of the demos can - * make use of this if it is available. - */ -#undef HAVE_XPM +/* Define this if you have the Independent JPEG Group's JPEG library + installed. Some of the demos can make use of this if it is available. */ +#undef HAVE_JPEGLIB -/* Define this if you have the GDK_Pixbuf library installed. Some of the - * demos can make use of this if it is available. - */ -#undef HAVE_GDK_PIXBUF +/* Define this if you want to use Kerberos authentication to lock/unlock the + screen instead of your local password. This currently uses Kerberos V4, but + a V5 server with V4 compatibility will work. WARNING: DO NOT USE AFS + string-to-key passwords with this option. This option currently *only* + works with standard Kerberos des_string_to_key. If your password is an AFS + password and not a kerberos password, it will not authenticate properly. + See the comments in driver/kpasswd.c for more information if you need it. + */ +#undef HAVE_KERBEROS -/* Define this if you have the Independent JPEG Group's JPEG library - * installed. Some of the demos can make use of this if it is available. - */ -#undef HAVE_JPEGLIB +/* Define this if you have Kerberos 5, meaning we need to use the Kerberos 4 + compatibility layer. */ +#undef HAVE_KERBEROS5 -/* Define this if you have the Xmu library. This is standard part of X, and - * if your vendor doesn't ship it, you should report that as a bug. - */ -#undef HAVE_XMU +/* Define if your file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES -/* Define this if you have OpenGL. Some of the demos require it, so if you - * don't have it, then those particular demos won't be built. (This won't - * affect the screen saver as a whole.) - */ -#undef HAVE_GL +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H -/* Define this if you have OpenGL, but it's the MesaGL variant. (The - libraries have different names.) (HAVE_GL should be defined too.) - */ +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define this if you have OpenGL, but it's the MesaGL variant. (The libraries + have different names.) (HAVE_GL should be defined too.) */ #undef HAVE_MESA_GL -/* Define this if your version of OpenGL has the glBindTexture() routine. - This is the case for OpenGL 1.1, but not for OpenGL 1.0. - */ -#undef HAVE_GLBINDTEXTURE +/* Define this if you have the MIT-SCREEN-SAVER extension installed. See the + caveats about this extension, above. (It's available if + /usr/include/X11/extensions/scrnsaver.h exists.) */ +#undef HAVE_MIT_SAVER_EXTENSION -/* Define this if you have the -lgle and -lmatrix libraries (GL extrusion.) - */ -#undef HAVE_GLE +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP -/* Define this if you have the -lgle from GLE version 3 - */ -#undef HAVE_GLE3 +/* Define this if you have Motif. */ +#undef HAVE_MOTIF -/* Define this if you have the X Shared Memory Extension. - */ -#undef HAVE_XSHM_EXTENSION +/* Define to 1 if you have the `munmap' function. */ +#undef HAVE_MUNMAP -/* Define this if you have the X Double Buffer Extension. - */ -#undef HAVE_DOUBLE_BUFFER_EXTENSION +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H -/* Set the name of the password helper program, if any - */ -#undef PASSWD_HELPER_PROGRAM +/* Define to 1 if you have the `nice' function. */ +#undef HAVE_NICE +/* Define to 1 if you have the header file. */ +#undef HAVE_NL_TYPES_H +/* Define this if you have the XML library headers in their old, + non-namespaced location (you lack the gnome-xml/libxml symlink) */ +#undef HAVE_OLD_XML_HEADERS -/* ************************************************************************* - CONFIGURING PASSWORD AUTHENTICATION - ************************************************************************* */ +/* Define this if you want to use PAM (Pluggable Authentication Modules) to + lock/unlock the screen, instead of standard /etc/passwd authentication. */ +#undef HAVE_PAM -/* Define this to remove the option of locking the screen at all. - */ -#undef NO_LOCKING +/* Define this if you have a Linux-like /proc/interrupts file which can be + examined to determine when keyboard activity has occurred. */ +#undef HAVE_PROC_INTERRUPTS -/* Define this if you want to use Kerberos authentication to lock/unlock the - * screen instead of your local password. This currently uses Kerberos V4, - * but a V5 server with V4 compatibility will work. WARNING: DO NOT USE AFS - * string-to-key passwords with this option. This option currently *only* - * works with standard Kerberos des_string_to_key. If your password is an - * AFS password and not a kerberos password, it will not authenticate - * properly. See the comments in driver/kpasswd.c for more information if you - * need it. - */ -#undef HAVE_KERBEROS +/* Define to 1 if you have the header file. */ +#undef HAVE_PTY_H -/* Define this if you have Kerberos 5, meaning we need to use the Kerberos 4 - * compatibility layer. - */ -#undef HAVE_KERBEROS5 +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV -/* Define this if you want to use PAM (Pluggable Authentication Modules) - * to lock/unlock the screen, instead of standard /etc/passwd authentication. - */ -#undef HAVE_PAM +/* Define this if you have the Resize and Rotate extension. This is standard + on sufficiently-recent XFree86 systems, and possibly elsewhere. (It's + available if the file /usr/include/X11/extensions/Xrandr.h exists.) */ +#undef HAVE_RANDR -/* If PAM is being used, this is the name of the PAM service that xscreensaver - * will authenticate as. The default is "xscreensaver", which means that the - * PAM library will look for an "xscreensaver" line in /etc/pam.conf, or (on - * recent Linux systems) will look for a file called /etc/pam.d/xscreensaver. - * Some systems might already have a PAM installation that is configured for - * xlock, so setting this to "xlock" would also work in that case. - */ -#define PAM_SERVICE_NAME "xscreensaver" +/* Define this if you have the XReadDisplay extension (I think this is an + SGI-only thing; it's in .) A few of the + screenhacks will take advantage of this if it's available. */ +#undef HAVE_READ_DISPLAY_EXTENSION -/* Define if you have PAM and pam_strerror() requires two arguments. */ -#undef PAM_STRERROR_TWO_ARGS +/* Define to 1 if you have the `realpath' function. */ +#undef HAVE_REALPATH -/* Define this if your system uses `shadow' passwords, that is, the passwords - * live in /etc/shadow instead of /etc/passwd, and one reads them with - * getspnam() instead of getpwnam(). (Note that SCO systems do some random - * other thing; others might as well. See the ifdefs in driver/passwd-pwent.c - * if you're having trouble related to reading passwords.) - */ +/* Define to 1 if you have the `sbrk' function. */ +#undef HAVE_SBRK + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the `setpriority' function. */ +#undef HAVE_SETPRIORITY + +/* Define to 1 if you have the `setrlimit' function. */ +#undef HAVE_SETRLIMIT + +/* Define this if you have the SGI SCREEN_SAVER extension. This is standard on + Irix systems, and not available elsewhere. */ +#undef HAVE_SGI_SAVER_EXTENSION + +/* Define this if you have the SGI-VIDEO-CONTROL extension. This is standard + on Irix systems, and not available elsewhere. */ +#undef HAVE_SGI_VC_EXTENSION + +/* Define this if your system uses 'shadow' passwords, that is, the passwords + live in /etc/shadow instead of /etc/passwd, and one reads them with + getspnam() instead of getpwnam(). (Note that SCO systems do some random + other thing; others might as well. See the ifdefs in driver/passwd-pwent.c + if you're having trouble related to reading passwords.) */ #undef HAVE_SHADOW_PASSWD -/* Define this if your system is Digital or SCO Unix with so-called ``Enhanced - Security'', that is, the passwords live in /tcb/files/auth// - instead of in /etc/passwd, and one reads them with getprpwnam() instead - of getpwnam(). - */ -#undef HAVE_ENHANCED_PASSWD +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION -/* Define this if your system is Solaris with ``adjunct'' passwords (this is - the version where one gets at the passwords with getpwanam() instead of - getpwnam().) I haven't tested this one, let me know if it works. - */ -#undef HAVE_ADJUNCT_PASSWD +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H -/* Define this if you are running HPUX with so-called ``Secure Passwords'' - (if you have /usr/include/hpsecurity.h, you probably have this.) I - haven't tested this one, let me know if it works. - */ -#undef HAVE_HPUX_PASSWD +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H -/* Define this if you are on a system that supports the VT_LOCKSWITCH and - VT_UNLOCKSWITCH ioctls. If this is defined, then when the screen is - locked, switching to another virtual terminal will also be prevented. - That is, the whole console will be locked, rather than just the VT on - which X is running. (Well, that's the theory anyway -- in practice, - I haven't yet figured out how to make that work.) - */ -#undef HAVE_VT_LOCKSWITCH +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR -/* Define this if you the openlog(), syslog(), and closelog() functions. - This is used for logging failed login attempts. - */ +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `syslog' function. */ #undef HAVE_SYSLOG +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H -/* ************************************************************************* - OTHER C ENVIRONMENT JUNK - ************************************************************************* */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H -/* Define this to void* if you're using X11R4 or earlier. */ -#undef XPointer +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H -/* Define if you have the nice function. */ -#undef HAVE_NICE +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H -/* Define if you have the setpriority function. */ -#undef HAVE_SETPRIORITY +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H -/* Define to empty if the keyword does not work. */ -#undef const +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H -/* Define if you have that is POSIX.1 compatible. */ +/* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline +/* Define to 1 if you have the `uname' function. */ +#undef HAVE_UNAME -/* Define to `int' if doesn't define. */ -#undef mode_t +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H -/* Define to `int' if doesn't define. */ -#undef pid_t +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIL_H -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE +/* Define this if you are on a system that supports the VT_LOCKSWITCH and + VT_UNLOCKSWITCH ioctls. If this is defined, then when the screen is locked, + switching to another virtual terminal will also be prevented. That is, the + whole console will be locked, rather than just the VT on which X is + running. (Well, that's the theory anyway -- in practice, I haven't yet + figured out how to make that work.) */ +#undef HAVE_VT_LOCKSWITCH -/* Define to `unsigned' if doesn't define. */ -#undef size_t +/* Define this if you have the XF86MiscSetGrabKeysState function (which allows + the Ctrl-Alt-KP_star and Ctrl-Alt-KP_slash key sequences to be temporarily + disabled. Sadly, it doesn't affect Ctrl-Alt-BS or Ctrl-Alt-F1.) */ +#undef HAVE_XF86MISCSETGRABKEYSSTATE -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +/* Define this if you have the functions XF86VidModeGetModeLine() and + XF86VidModeGetViewPort(), in support of virtual desktops where the X + server's root window is bigger than the actual screen. This is an XFree86 + thing, and probably doesn't exist elsewhere. (It's available if the file + /usr/include/X11/extensions/xf86vmode.h exists.) */ +#undef HAVE_XF86VMODE -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME +/* Define this if you have the functions XF86VidModeGetGamma() and + XF86VidModeSetGamma(), which allow clients to change the gamma response of + the monitor. This is an XFree86 4.0.x thing, and probably doesn't exist + elsewhere. (It's available if the file + /usr/include/X11/extensions/xf86vmode.h exists and has stuff about gamma in + it.) */ +#undef HAVE_XF86VMODE_GAMMA -/* Define if you have the gettimeofday function. */ -#undef HAVE_GETTIMEOFDAY +/* Define this if you have the functions XF86VidModeGetGammaRamp() and + XF86VidModeSetGammaRamp(), which provide finer-grained control than + XF86VidMode[GS]etGamma(). These appeared in XFree86 4.1.0. */ +#undef HAVE_XF86VMODE_GAMMA_RAMP -/* Define if gettimeofday requires two arguments. */ -#undef GETTIMEOFDAY_TWO_ARGS +/* Define this if you have the XHPDisableReset function (an HP only thing + which allows the Ctrl-Sh-Reset key sequence to be temporarily disabled.) */ +#undef HAVE_XHPDISABLERESET -/* Define if you have the putenv function. */ -#undef HAVE_PUTENV +/* Define this if you have the XIDLE extension installed. If you have the + XIDLE extension, this is recommended. (You have this extension if the file + /usr/include/X11/extensions/xidle.h exists.) Turning on this flag lets + XScreenSaver work better with servers which support this extension; but it + will still work with servers which do not suport it, so it's a good idea to + compile in support for it if you can. */ +#undef HAVE_XIDLE_EXTENSION -/* Define if you have the select function. */ -#undef HAVE_SELECT +/* Define this if you have the Xinerama extension. This is standard on + sufficiently-recent XFree86 systems, and possibly elsewhere. (It's + available if the file /usr/include/X11/extensions/Xinerama.h exists.) */ +#undef HAVE_XINERAMA -/* Define if you have the getcwd function. */ -#undef HAVE_GETCWD +/* Define this if you have the XmComboBox Motif widget (Motif 2.0.) */ +#undef HAVE_XMCOMBOBOX -/* Define if you have the getcwd function. */ -#undef HAVE_GETWD +/* Define this if you have the XML library. */ +#undef HAVE_XML -/* Define if you have the realpath function. */ -#undef HAVE_REALPATH +/* Define this if you have the Xmu library. This is standard part of X, and if + your vendor doesn't ship it, you should report that as a bug. */ +#undef HAVE_XMU -/* Define if you have the uname function. */ -#undef HAVE_UNAME +/* Define this if you have the XPM library installed. Some of the demos can + make use of this if it is available. */ +#undef HAVE_XPM -/* Define if you have the fcntl function. */ -#undef HAVE_FCNTL +/* Define this if you have the X Shared Memory Extension. */ +#undef HAVE_XSHM_EXTENSION -/* Define if you have the sigaction function. */ -#undef HAVE_SIGACTION +/* Define to 1 if you have the `__argz_count' function. */ +#undef HAVE___ARGZ_COUNT -/* Define this if you have the setrlimit function. */ -#undef HAVE_SETRLIMIT +/* Define to 1 if you have the `__argz_next' function. */ +#undef HAVE___ARGZ_NEXT -/* Define if you have the sbrk function. */ -#undef HAVE_SBRK +/* Define to 1 if you have the `__argz_stringify' function. */ +#undef HAVE___ARGZ_STRINGIFY -/* Define if you have the forkpty function. */ -#undef HAVE_FORKPTY +/* Define this to remove the option of locking the screen at all. */ +#undef NO_LOCKING -/* Define if you have the header file. */ -#undef HAVE_PTY_H +/* This is the same as GETTEXT_PACKAGE, but for the glade generated code. */ +#undef PACKAGE -/* Define if you have the header file. */ -#undef HAVE_UTIL_H +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H +/* Define to the full name of this package. */ +#undef PACKAGE_NAME -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING -/* Define if you have the setlocale function. */ -#undef HAVE_SETLOCALE +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME -/* Define if you have the header file. */ -#undef HAVE_CRYPT_H +/* Define to the version of this package. */ +#undef PACKAGE_VERSION -/* Define if you have that defines fd_set and FD_SET. */ -#undef HAVE_SYS_SELECT_H +/* If PAM is being used, this is the name of the PAM service that xscreensaver + will authenticate as. The default is "xscreensaver", which means that the + PAM library will look for an "xscreensaver" line in /etc/pam.conf, or (on + recent Linux systems) will look for a file called /etc/pam.d/xscreensaver. + Some systems might already have a PAM installation that is configured for + xlock, so setting this to "xlock" would also work in that case. */ +#undef PAM_SERVICE_NAME -/* Define this if you do pings with a `struct icmp' and a `icmp_id' slot. - */ -#undef HAVE_ICMP +/* Define if you have PAM and pam_strerror() requires two arguments. */ +#undef PAM_STRERROR_TWO_ARGS -/* Define this if you do pings with a `struct icmphdr' and a `un.echo.id' slot. - */ -#undef HAVE_ICMPHDR +/* Set the name of the password helper program, if any */ +#undef PASSWD_HELPER_PROGRAM -/* This is the name of the gettext package to use. - */ -#undef GETTEXT_PACKAGE +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE -/* This is the same as GETTEXT_PACKAGE, but for the glade generated - * code. - */ -#undef PACKAGE +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION -/* Define this if you want to build with NLS support - */ -#undef ENABLE_NLS +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define this to void* if you're using X11R4 or earlier. */ +#undef XPointer + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define to `long' if does not define. */ +#undef off_t + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned' if does not define. */ +#undef size_t diff --git a/configure b/configure index 8e0fb054..9873d74b 100755 --- a/configure +++ b/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS login_manager_tmp pkg_config gnome_open_program gnome_url_show_program INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS XINERAMA_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM NEW_LOGIN_COMMAND NEW_LOGIN_COMMAND_P DEFAULT_IMAGES_P DEFAULT_IMAGE_DIRECTORY OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOME24 GNOME22 NOGNOME HACKDIR GTK_DATADIR PO_DATADIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS login_manager_tmp pkg_config gnome_open_program gnome_url_show_program INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS XINERAMA_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM NEW_LOGIN_COMMAND NEW_LOGIN_COMMAND_P DEFAULT_IMAGES_P DEFAULT_IMAGE_DIRECTORY DEFAULT_TEXT_FILE OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOME24 GNOME22 NOGNOME HACKDIR GTK_DATADIR PO_DATADIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -348,7 +348,7 @@ libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' -mandir='${prefix}/man' +mandir=\${datadir}/man ac_prev= for ac_option @@ -857,7 +857,7 @@ Optional Packages: Installation options: --with-hackdir=DIR Where to install the hundreds of demo executables. - Default: `EPREFIX/lib/xscreensaver/' + Default: `PREFIX/libexec/xscreensaver/' --with-configdir=DIR Where to install the data files that describe each of the display modes to the GUI. Default: `PREFIX/share/xscreensaver/config/' @@ -886,6 +886,9 @@ Screen blanking and idle-detection options: --with-proc-interrupts Include support for consulting the /proc/interrupts file to notice keyboard activity. --with-pam Include support for PAM (Pluggable Auth Modules.) + --with-pam-service-name=NAME + NAME is the name of the PAM service that + xscreensaver will authenticate as. --with-kerberos Include support for Kerberos authentication. --with-shadow Include support for shadow password authentication. --with-passwd-helper Include support for an external password @@ -913,8 +916,9 @@ Graphics options: --with-xshm-ext Include support for the Shared Memory extension. --with-xdbe-ext Include support for the DOUBLE-BUFFER extension. --with-readdisplay Include support for the XReadDisplay extension. - --with-image-directory=DIR By default, some screen savers may load - random images out of this directory. + --with-image-directory=DIR By default, some demos may display random images + from this directory. + --with-text-file=FILE By default, some demos may display this file. --with-setuid-hacks Allow some demos to be installed `setuid root' (which is needed in order to ping other hosts.) @@ -1371,6 +1375,172 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "current directory: `pwd`" echo "command line was: $0 $@" + +############################################################################### +# +# Autoheader stuff +# +############################################################################### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # After checking to see that --srcdir is correct (which AC_INIT does) @@ -7125,17 +7295,19 @@ fi GETTEXT_PACKAGE=xscreensaver + cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE "$GETTEXT_PACKAGE" _ACEOF -ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" +ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 @@ -12110,6 +12282,15 @@ else fi; +# Check whether --with-pam_service_name or --without-pam_service_name was given. +if test "${with_pam_service_name+set}" = set; then + withval="$with_pam_service_name" + pam_service_name="$withval" +else + pam_service_name="xscreensaver" +fi; + + case "$with_pam" in yes) ;; no) ;; @@ -12221,6 +12402,11 @@ echo "${ECHO_T}$ac_cv_pam" >&6 #define HAVE_PAM 1 _ACEOF + cat >>confdefs.h <<_ACEOF +#define PAM_SERVICE_NAME "$pam_service_name" +_ACEOF + + PASSWD_LIBS="${PASSWD_LIBS} -lpam" # libpam typically requires dlopen and dlsym. On FreeBSD, @@ -15926,7 +16112,7 @@ if test "${ac_cv_mesagl_version_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.$ac_ext < #ifndef MESA_MAJOR_VERSION @@ -17952,7 +18138,8 @@ fi ############################################################################### # -# Check for pty support for 'phosphor' +# Check for pty support: this allows 'phosphor' and 'apple2' +# to run curses-based programs, or be used as terminal windows. # ############################################################################### @@ -19106,6 +19293,79 @@ if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then fi +############################################################################### +# +# Pick a text file to use as the default of the "textFile" preference. +# Any old file will do, but preferably one that will make interesting +# shapes when displayed by "starwars" and "fontglide". +# +############################################################################### + +have_textfile=no +with_textfile_req=unspecified + + +# Check whether --with-text-file or --without-text-file was given. +if test "${with_text_file+set}" = set; then + withval="$with_text_file" + with_textfile="$withval"; with_textfile_req="$withval" +else + with_textfile=yes +fi; +# no HANDLE_X_PATH_ARG for this one + +case "$with_textfile" in + /*) + # absolute path + echo "$as_me:$LINENO: checking for image directory $with_textfile" >&5 +echo $ECHO_N "checking for image directory $with_textfile... $ECHO_C" >&6 + if test -d "$with_textfile" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + with_textfile="" + fi + ;; + yes) + with_textfile="" + + #### Could use some more defaults here... + for f in \ + "/usr/X11R6/lib/X11/doc/README" \ + "/usr/share/doc/xserver-common/copyright" \ + "/usr/X11R6/README" \ + ; do + if test -z "$with_textfile"; then + echo "$as_me:$LINENO: checking for text file $f" >&5 +echo $ECHO_N "checking for text file $f... $ECHO_C" >&6 + if test -f "$f" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + with_textfile="$f" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + done + + ;; + no) + with_textfile="" + ;; + + *) + echo "error: must be an absolute path: --with-image-directory=$with_textfile_req" + exit 1 + ;; +esac +ac_cv_textfile="$with_textfile" + +DEFAULT_TEXT_FILE="$ac_cv_textfile" + + ############################################################################### # # Check whether it's ok to install some hacks as setuid (e.g., "sonar") @@ -19405,6 +19665,7 @@ INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'` + APPDEFAULTS=$ac_x_app_defaults @@ -20143,6 +20404,7 @@ s,@NEW_LOGIN_COMMAND@,$NEW_LOGIN_COMMAND,;t t s,@NEW_LOGIN_COMMAND_P@,$NEW_LOGIN_COMMAND_P,;t t s,@DEFAULT_IMAGES_P@,$DEFAULT_IMAGES_P,;t t s,@DEFAULT_IMAGE_DIRECTORY@,$DEFAULT_IMAGE_DIRECTORY,;t t +s,@DEFAULT_TEXT_FILE@,$DEFAULT_TEXT_FILE,;t t s,@OBJCC@,$OBJCC,;t t s,@EXES_OSX@,$EXES_OSX,;t t s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t diff --git a/configure.in b/configure.in index d9b88620..7889de45 100644 --- a/configure.in +++ b/configure.in @@ -8,6 +8,282 @@ AC_CONFIG_HEADER(config.h) echo "current directory: `pwd`" echo "command line was: $0 $@" +############################################################################### +# +# Autoheader stuff +# +############################################################################### + +AH_TOP([ +/* config.h.in --- xscreensaver, Copyright (c) 1998-2000 Jamie Zawinski. + * + * The best way to set these parameters is by running the included `configure' + * script. That examines your system, and generates `config.h' from + * `config.h.in'. + * + * If something goes very wrong, you can edit `config.h' directly, but beware + * that your changes will be lost if you ever run `configure' again. + */ +]) + +AH_TEMPLATE([HAVE_READ_DISPLAY_EXTENSION], + [Define this if you have the XReadDisplay extension (I think + this is an SGI-only thing; it's in + .) A few of the screenhacks will + take advantage of this if it's available.]) + +AH_TEMPLATE([HAVE_XHPDISABLERESET], + [Define this if you have the XHPDisableReset function (an HP only + thing which allows the Ctrl-Sh-Reset key sequence to be + temporarily disabled.)]) + +AH_TEMPLATE([HAVE_XIDLE_EXTENSION], + [Define this if you have the XIDLE extension installed. If you + have the XIDLE extension, this is recommended. (You have this + extension if the file /usr/include/X11/extensions/xidle.h + exists.) Turning on this flag lets XScreenSaver work better with + servers which support this extension; but it will still work + with servers which do not suport it, so it's a good idea to + compile in support for it if you can.]) + +AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION], + [Define this if you have the MIT-SCREEN-SAVER extension + installed. See the caveats about this extension, above. + (It's available if /usr/include/X11/extensions/scrnsaver.h + exists.)]) + +AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION], + [Define this if you have the SGI SCREEN_SAVER extension. This is + standard on Irix systems, and not available elsewhere.]) + +AH_TEMPLATE([HAVE_SGI_VC_EXTENSION], + [Define this if you have the SGI-VIDEO-CONTROL extension. This + is standard on Irix systems, and not available elsewhere.]) + +AH_TEMPLATE([HAVE_DPMS_EXTENSION], + [Define this if you have the XDPMS extension. This is standard + on sufficiently-recent XFree86 systems, and possibly elsewhere. + (It's available if the file /usr/include/X11/extensions/dpms.h + exists.)]) + +AH_TEMPLATE([HAVE_XF86VMODE], + [Define this if you have the functions XF86VidModeGetModeLine() + and XF86VidModeGetViewPort(), in support of virtual desktops + where the X server's root window is bigger than the actual + screen. This is an XFree86 thing, and probably doesn't exist + elsewhere. (It's available if the file + /usr/include/X11/extensions/xf86vmode.h exists.)]) + +AH_TEMPLATE([HAVE_XF86VMODE_GAMMA], + [Define this if you have the functions XF86VidModeGetGamma() and + XF86VidModeSetGamma(), which allow clients to change the gamma + response of the monitor. This is an XFree86 4.0.x thing, and + probably doesn't exist elsewhere. (It's available if the file + /usr/include/X11/extensions/xf86vmode.h exists and has stuff about + gamma in it.)]) + +AH_TEMPLATE([HAVE_XF86VMODE_GAMMA_RAMP], + [Define this if you have the functions XF86VidModeGetGammaRamp() + and XF86VidModeSetGammaRamp(), which provide finer-grained + control than XF86VidMode[GS]etGamma(). These appeared in + XFree86 4.1.0.]) + +AH_TEMPLATE([HAVE_XINERAMA], + [Define this if you have the Xinerama extension. This is + standard on sufficiently-recent XFree86 systems, and possibly + elsewhere. (It's available if the file + /usr/include/X11/extensions/Xinerama.h exists.)]) + +AH_TEMPLATE([HAVE_XF86MISCSETGRABKEYSSTATE], + [Define this if you have the XF86MiscSetGrabKeysState function + (which allows the Ctrl-Alt-KP_star and Ctrl-Alt-KP_slash key + sequences to be temporarily disabled. Sadly, it doesn't affect + Ctrl-Alt-BS or Ctrl-Alt-F1.)]) + +AH_TEMPLATE([HAVE_RANDR], + [Define this if you have the Resize and Rotate extension. + This is standard on sufficiently-recent XFree86 systems, and + possibly elsewhere. (It's available if the file + /usr/include/X11/extensions/Xrandr.h exists.)]) + +AH_TEMPLATE([HAVE_PROC_INTERRUPTS], + [Define this if you have a Linux-like /proc/interrupts file which + can be examined to determine when keyboard activity has + occurred.]) + +AH_TEMPLATE([HAVE_MOTIF],[Define this if you have Motif.]) + +AH_TEMPLATE([HAVE_XMCOMBOBOX], + [Define this if you have the XmComboBox Motif widget (Motif 2.0.)]) + +AH_TEMPLATE([HAVE_GTK],[Define this if you have Gtk (any version.)]) +AH_TEMPLATE([HAVE_GTK2],[Define this if you have Gtk 2.x.]) + +AH_TEMPLATE([HAVE_CRAPPLET], + [Define this if you have Gnome and want to build support for the + xscreensaver control panel in the Gnome Control Center + (gnomecc). (This is needed only with Gtk 1.x.)]) + +AH_TEMPLATE([HAVE_CRAPPLET_IMMEDIATE], + [Define this if HAVE_CRAPPLET is defined, and the function + capplet_widget_changes_are_immediate() is available.]) + +AH_TEMPLATE([HAVE_XML],[Define this if you have the XML library.]) + +AH_TEMPLATE([HAVE_OLD_XML_HEADERS], + [Define this if you have the XML library headers in their old, + non-namespaced location (you lack the gnome-xml/libxml symlink)]) + +AH_TEMPLATE([HAVE_XPM], + [Define this if you have the XPM library installed. Some of the + demos can make use of this if it is available.]) + +AH_TEMPLATE([HAVE_GDK_PIXBUF], + [Define this if you have the GDK_Pixbuf library installed. Some + of the demos can make use of this if it is available.]) + +AH_TEMPLATE([HAVE_JPEGLIB], + [Define this if you have the Independent JPEG Group's JPEG + library installed. Some of the demos can make use of this if it + is available.]) + +AH_TEMPLATE([HAVE_XMU], + [Define this if you have the Xmu library. This is standard part + of X, and if your vendor doesn't ship it, you should report that + as a bug.]) + +AH_TEMPLATE([HAVE_GL], + [Define this if you have OpenGL. Some of the demos require it, + so if you don't have it, then those particular demos won't be + built. (This won't affect the screen saver as a whole.)]) + +AH_TEMPLATE([HAVE_MESA_GL], + [Define this if you have OpenGL, but it's the MesaGL variant. + (The libraries have different names.) (HAVE_GL should be defined + too.)]) + +AH_TEMPLATE([HAVE_GLBINDTEXTURE], + [Define this if your version of OpenGL has the glBindTexture() + routine. This is the case for OpenGL 1.1, but not for OpenGL + 1.0.]) + +AH_TEMPLATE([HAVE_GLE], + [Define this if you have the -lgle and -lmatrix libraries (GL + extrusion.)]) + +AH_TEMPLATE([HAVE_GLE3],[Define this if you have the -lgle from GLE version 3]) + +AH_TEMPLATE([HAVE_XSHM_EXTENSION], + [Define this if you have the X Shared Memory Extension.]) + +AH_TEMPLATE([HAVE_DOUBLE_BUFFER_EXTENSION], + [Define this if you have the X Double Buffer Extension.]) + +AH_TEMPLATE([FORTUNE_PROGRAM], + [Some screenhacks like to run an external program to generate + random pieces of text; set this to the one you like. Note that + this is just the default; X resources can be used to override + it.]) + +AH_TEMPLATE([PASSWD_HELPER_PROGRAM], + [Set the name of the password helper program, if any]) + +AH_TEMPLATE([NO_LOCKING], + [Define this to remove the option of locking the screen at all.]) + +AH_TEMPLATE([HAVE_KERBEROS], + [Define this if you want to use Kerberos authentication to + lock/unlock the screen instead of your local password. This + currently uses Kerberos V4, but a V5 server with V4 + compatibility will work. WARNING: DO NOT USE AFS string-to-key + passwords with this option. This option currently *only* works + with standard Kerberos des_string_to_key. If your password is + an AFS password and not a kerberos password, it will not + authenticate properly. See the comments in driver/kpasswd.c for + more information if you need it.]) + +AH_TEMPLATE([HAVE_KERBEROS5], + [Define this if you have Kerberos 5, meaning we need to use the + Kerberos 4 compatibility layer.]) + +AH_TEMPLATE([HAVE_PAM], + [Define this if you want to use PAM (Pluggable Authentication + Modules) to lock/unlock the screen, instead of standard + /etc/passwd authentication.]) + +AH_TEMPLATE([PAM_SERVICE_NAME], + [If PAM is being used, this is the name of the PAM service that + xscreensaver will authenticate as. The default is + "xscreensaver", which means that the PAM library will look for + an "xscreensaver" line in /etc/pam.conf, or (on recent Linux + systems) will look for a file called /etc/pam.d/xscreensaver. + Some systems might already have a PAM installation that is + configured for xlock, so setting this to "xlock" would also work + in that case.]) + +AH_TEMPLATE([PAM_STRERROR_TWO_ARGS], + [Define if you have PAM and pam_strerror() requires two + arguments.]) + +AH_TEMPLATE([HAVE_SHADOW_PASSWD], + [Define this if your system uses 'shadow' passwords, that is, the + passwords live in /etc/shadow instead of /etc/passwd, and one + reads them with getspnam() instead of getpwnam(). (Note that + SCO systems do some random other thing; others might as well. + See the ifdefs in driver/passwd-pwent.c if you're having trouble + related to reading passwords.)]) + +AH_TEMPLATE([HAVE_ENHANCED_PASSWD], + [Define this if your system is Digital or SCO Unix with so-called + ``Enhanced Security'', that is, the passwords live in + /tcb/files/auth// instead of in /etc/passwd, and one + reads them with getprpwnam() instead of getpwnam().]) + +AH_TEMPLATE([HAVE_ADJUNCT_PASSWD], + [Define this if your system is Solaris with ``adjunct'' passwords + (this is the version where one gets at the passwords with + getpwanam() instead of getpwnam().) I haven't tested this one, + let me know if it works.]) + +AH_TEMPLATE([HAVE_HPUX_PASSWD], + [Define this if you are running HPUX with so-called ``Secure + Passwords'' (if you have /usr/include/hpsecurity.h, you probably + have this.) I haven't tested this one, let me know if it works.]) + +AH_TEMPLATE([HAVE_VT_LOCKSWITCH], + [Define this if you are on a system that supports the + VT_LOCKSWITCH and VT_UNLOCKSWITCH ioctls. If this is defined, + then when the screen is locked, switching to another virtual + terminal will also be prevented. That is, the whole console + will be locked, rather than just the VT on which X is running. + (Well, that's the theory anyway -- in practice, I haven't yet + figured out how to make that work.)]) + +AH_TEMPLATE([HAVE_SYSLOG], + [Define this if you the openlog(), syslog(), and closelog() + functions. This is used for logging failed login attempts.]) + +AH_TEMPLATE([HAVE_ICMP], + [Define this if you do pings with a `struct icmp' and an + `icmp_id' slot.]) + +AH_TEMPLATE([HAVE_ICMPHDR], + [Define this if you do pings with a `struct icmphdr' and an + `un.echo.id' slot.]) + +AH_TEMPLATE([HAVE_FORKPTY], + [Define this if you have the 'forkpty' function: + This allows 'phosphor' and 'apple2' to run curses-based + programs, or be used as terminal windows.]) + +AH_TEMPLATE([HAVE_GETTIMEOFDAY], + [Define this if you have the gettimeofday function.]) + +AH_TEMPLATE([GETTIMEOFDAY_TWO_ARGS], + [Define this if gettimeofday() takes two arguments.]) + +AH_TEMPLATE([XPointer], + [Define this to void* if you're using X11R4 or earlier.]) # After checking to see that --srcdir is correct (which AC_INIT does) # check for some random other files that come later in the tar file, @@ -877,11 +1153,14 @@ AC_MSG_RESULT($ac_macosx) AC_PROG_INTLTOOL GETTEXT_PACKAGE=xscreensaver -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") -AC_DEFINE_UNQUOTED(PACKAGE, "$GETTEXT_PACKAGE") +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", + [This is the name of the gettext package to use.]) +AC_DEFINE_UNQUOTED(PACKAGE, "$GETTEXT_PACKAGE", + [This is the same as GETTEXT_PACKAGE, but for the glade + generated code.]) AC_SUBST(GETTEXT_PACKAGE) -ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" +ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" AM_GLIB_GNU_GETTEXT MKINSTALLDIRS="$INSTALL_DIRS" @@ -964,7 +1243,7 @@ AC_ARG_WITH(hackdir,[ Installation options: --with-hackdir=DIR Where to install the hundreds of demo executables. - Default: `EPREFIX/lib/xscreensaver/'], + Default: `PREFIX/libexec/xscreensaver/'], [with_hackdir="$withval"; with_hackdir_req="$withval"],[with_hackdir=yes]) if test x"$with_hackdir" = xyes; then @@ -1550,6 +1829,12 @@ AC_ARG_WITH(pam, [ --with-pam Include support for PAM (Pluggable Auth Modules.)], [with_pam="$withval"; with_pam_req="$withval"],[with_pam=$with_pam_default]) +AC_ARG_WITH([pam_service_name], + AC_HELP_STRING([--with-pam-service-name=NAME], + [NAME is the name of the PAM service that + xscreensaver will authenticate as.]), + [pam_service_name="$withval"],[pam_service_name="xscreensaver"]) + HANDLE_X_PATH_ARG(with_pam, --with-pam, PAM) if test "$enable_locking" = yes -a "$with_pam" = yes; then @@ -1560,6 +1845,8 @@ if test "$enable_locking" = yes -a "$with_pam" = yes; then if test "$ac_cv_pam" = yes ; then have_pam=yes AC_DEFINE(HAVE_PAM) + AC_DEFINE_UNQUOTED(PAM_SERVICE_NAME,"$pam_service_name") + PASSWD_LIBS="${PASSWD_LIBS} -lpam" # libpam typically requires dlopen and dlsym. On FreeBSD, @@ -2811,7 +3098,8 @@ fi ############################################################################### # -# Check for pty support for 'phosphor' +# Check for pty support: this allows 'phosphor' and 'apple2' +# to run curses-based programs, or be used as terminal windows. # ############################################################################### @@ -2950,8 +3238,8 @@ have_imagedir=no with_imagedir_req=unspecified AC_ARG_WITH(image-directory, -[ --with-image-directory=DIR By default, some screen savers may load - random images out of this directory.], +[ --with-image-directory=DIR By default, some demos may display random images + from this directory.], [with_imagedir="$withval"; with_imagedir_req="$withval"], [with_imagedir=yes]) # no HANDLE_X_PATH_ARG for this one @@ -3007,6 +3295,69 @@ if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then fi +############################################################################### +# +# Pick a text file to use as the default of the "textFile" preference. +# Any old file will do, but preferably one that will make interesting +# shapes when displayed by "starwars" and "fontglide". +# +############################################################################### + +have_textfile=no +with_textfile_req=unspecified + +AC_ARG_WITH(text-file, +[ --with-text-file=FILE By default, some demos may display this file.], + [with_textfile="$withval"; with_textfile_req="$withval"], + [with_textfile=yes]) +# no HANDLE_X_PATH_ARG for this one + +case "$with_textfile" in + /*) + # absolute path + AC_MSG_CHECKING([for image directory $with_textfile]) + if test -d "$with_textfile" ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + with_textfile="" + fi + ;; + yes) + with_textfile="" + + #### Could use some more defaults here... + for f in \ + "/usr/X11R6/lib/X11/doc/README" \ + "/usr/share/doc/xserver-common/copyright" \ + "/usr/X11R6/README" \ + ; do + if test -z "$with_textfile"; then + AC_MSG_CHECKING([for text file $f]) + if test -f "$f" ; then + AC_MSG_RESULT(yes) + with_textfile="$f" + else + AC_MSG_RESULT(no) + fi + fi + done + + ;; + no) + with_textfile="" + ;; + + *) + echo "error: must be an absolute path: --with-image-directory=$with_textfile_req" + exit 1 + ;; +esac +ac_cv_textfile="$with_textfile" + +DEFAULT_TEXT_FILE="$ac_cv_textfile" + + ############################################################################### # # Check whether it's ok to install some hacks as setuid (e.g., "sonar") @@ -3228,6 +3579,7 @@ AC_SUBST(NEW_LOGIN_COMMAND) AC_SUBST(NEW_LOGIN_COMMAND_P) AC_SUBST(DEFAULT_IMAGES_P) AC_SUBST(DEFAULT_IMAGE_DIRECTORY) +AC_SUBST(DEFAULT_TEXT_FILE) AC_SUBST(OBJCC) AC_SUBST(EXES_OSX) diff --git a/driver/Makefile.in b/driver/Makefile.in index aba8fd87..aa02e51b 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -350,24 +350,42 @@ munge-scripts: $(SCRIPTS) if cmp -s $(srcdir)/$$program $$tmp ; then \ true ; \ else \ - echo "$$program: setting interpreter to $$perl" ; \ + echo "$$program: setting interpreter to $$perl" >&2 ; \ cat $$tmp > ./$$program ; \ fi ; \ done ; \ rm -f $$tmp +# When installing man pages, we install "foo.man" as "foo.N" and update +# the .TH line in the installed file with one like +# +# .TH XScreenSaver N "V.VV (DD-MMM-YYYY)" "X Version 11" +# +# where N is the manual section suffix. +# install-man: $(MEN) @men="$(MEN)" ; \ + U=$(UTILS_SRC)/version.h ; \ + V=`sed -n 's/.*\([0-9]\.[^)]*)\).*/\1/p' < $$U` ; \ + T=/tmp/xs$$$$.$(mansuffix) ; \ + TH=".TH XScreenSaver $(mansuffix) \"$$V\" \"X Version 11\"" ; \ + echo "installing man pages: $$TH" ; \ + \ if [ ! -d $(install_prefix)$(manNdir) ]; then \ $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \ fi ; \ + \ for man in $$men; do \ instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ + sed -e "s/^\.TH.*/$$TH/" \ + -e 's/^\(\.BR xscr.*(\)[^()]\(.*\)/\1$(mansuffix)\2/' \ + < $(srcdir)/$$man > $$T ; \ echo $(INSTALL_DATA) $(srcdir)/$$man \ $(install_prefix)$(manNdir)/$$instname ; \ - $(INSTALL_DATA) $(srcdir)/$$man \ + $(INSTALL_DATA) $$T \ $(install_prefix)$(manNdir)/$$instname ; \ - done + done ; \ + rm -f $$T uninstall-program: @for program in $(EXES) $(SCRIPTS); do \ @@ -382,8 +400,8 @@ uninstall-man: @men="$(MEN)" ; \ for man in $$men; do \ instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ - echo rm -f $(install_prefix)$(manNdir)/$$instname ; \ - rm -f $(install_prefix)$(manNdir)/$$instname ; \ + echo rm -f $(install_prefix)$(manNdir)/$$instname* ; \ + rm -f $(install_prefix)$(manNdir)/$$instname* ; \ done install-pam: @@ -543,7 +561,7 @@ install-gnome:: xscreensaver-demo.glade2 # into /usr/share/applications/ uninstall-gnome:: @if [ "$(GTK_DATADIR)" != "" ]; then \ - f=screensaver-properties.desktop ;\ + f=gnome-screensaver-properties.desktop ;\ echo rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\ rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\ fi @@ -611,7 +629,7 @@ depend: XScreenSaver_ad.h XScreenSaver_Xm_ad.h # close. This excludes dependencies on files in /usr/include, etc. It tries # to include only dependencies on files which are themselves a part of this # package. -distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h +distdepend: check_men update_ad_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h @echo updating dependencies in `pwd`/Makefile.in... ; \ $(DEPEND) -w 0 -f - \ -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ @@ -658,23 +676,6 @@ update_ad_version:: done ; \ rm $$T -update_man_version:: - @for S in $(MEN); do \ - U=$(UTILS_SRC)/version.h ; \ - V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \ - V="`date '+%d-%b-%Y'` ($$V)" ; \ - T=/tmp/xs.$$$$ ; \ - sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \ - < $$S > $$T ; \ - if cmp -s $$S $$T ; then \ - true ; \ - else \ - cat $$T > $$S ; \ - echo "updated $$S to \"$$V\"" ; \ - fi ; \ - rm $$T ; \ - done - TAGS: tags tags: find $(srcdir) -name '*.[chly]' -print | xargs etags -a @@ -782,6 +783,9 @@ xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS) $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \ -lXt -lX11 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS) +demo-Gtk.o: XScreenSaver_ad.h +demo-Xm.o: XScreenSaver_ad_Xm.h + xscreensaver-getimage: $(GETIMG_OBJS) $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm @@ -843,13 +847,13 @@ xdpyinfo: xdpyinfo.o demo-Gtk-conf.o: ../config.h demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h +demo-Gtk.o: XScreenSaver_ad.h demo-Gtk.o: ../config.h demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h demo-Gtk.o: $(srcdir)/demo-Gtk-support.h demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h demo-Gtk.o: $(srcdir)/prefs.h demo-Gtk.o: $(srcdir)/remote.h -demo-Gtk.o: XScreenSaver_ad.h demo-Gtk-support.o: ../config.h demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h demo-Gtk-widgets.o: ../config.h @@ -888,9 +892,9 @@ test-fade.o: ../config.h test-fade.o: $(srcdir)/prefs.h test-fade.o: $(srcdir)/xscreensaver.h test-grab.o: ../config.h +test-passwd.o: XScreenSaver_ad.h test-passwd.o: ../config.h test-passwd.o: $(srcdir)/prefs.h -test-passwd.o: XScreenSaver_ad.h test-passwd.o: $(srcdir)/xscreensaver.h test-randr.o: ../config.h test-uid.o: ../config.h @@ -908,9 +912,9 @@ xscreensaver-command.o: $(srcdir)/remote.h xscreensaver-getimage.o: ../config.h xscreensaver-getimage.o: XScreenSaver_ad.h xscreensaver-getimage.o: $(srcdir)/prefs.h +xscreensaver.o: XScreenSaver_ad.h xscreensaver.o: ../config.h xscreensaver.o: $(srcdir)/prefs.h -xscreensaver.o: XScreenSaver_ad.h xscreensaver.o: $(srcdir)/xscreensaver.h xset.o: ../config.h xset.o: $(srcdir)/prefs.h diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 113f6bfb..807892d8 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -4,8 +4,8 @@ ! a screen saver and locker for the X window system ! by Jamie Zawinski ! -! version 4.21 -! 20-Mar-2005 +! version 4.22 +! 22-Jun-2005 ! ! See "man xscreensaver" for more info. The latest version is always ! available at http://www.jwz.org/xscreensaver/ @@ -59,7 +59,7 @@ *textMode: file *textLiteral: XScreenSaver -*textFile: /usr/X11R6/lib/X11/doc/README +*textFile: @DEFAULT_TEXT_FILE@ *textProgram: fortune *textURL: http://www.livejournal.com/stats/latest-rss.bml @@ -314,6 +314,7 @@ GetViewPortIsFullOfLies: False substrate -root \n\ "Substrate (circles)" substrate -root -circle-percent 33 \n\ intermomentary -root \n\ + interaggregate -root \n\ fireworkx -root \n\ fiberlamp -root \n\ boxfit -root \n\ @@ -396,6 +397,10 @@ GetViewPortIsFullOfLies: False @GL_KLUDGE@ GL: boing -root -lighting -smooth \n\ - GL: carousel -root \n\ @GL_KLUDGE@ GL: fliptext -root \n\ +- GL: antmaze -root \n\ +@GL_KLUDGE@ GL: tangram -root \n\ +@GL_KLUDGE@ GL: crackberg -root -flat -lit -crack \ + -color random \n\ \ - xdaliclock -root -builtin3 -cycle \n\ - default-n: xearth -nofork -nostars -ncolors 50 \ @@ -468,6 +473,7 @@ XScreenSaver.bourneShell: /bin/sh *passwd.user.label: Username: *passwd.passwd.label: Password: *passwd.thermometer.width: 8 +*passwd.asterisks: True *splash.heading.label: XScreenSaver %s *splash.body.label: Copyright © 1991-2005 by diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h index 86afe18b..663c37e0 100644 --- a/driver/XScreenSaver_ad.h +++ b/driver/XScreenSaver_ad.h @@ -13,7 +13,7 @@ "*grabDesktopImages: True", "*grabVideoFrames: False", "*chooseRandomImages: True", -"*imageDirectory: /usr/share/backgrounds/images/", +"*imageDirectory: /Library/Desktop Pictures/", "*nice: 10", "*memoryLimit: 0", "*lock: False", @@ -31,7 +31,7 @@ "*ignoreUninstalledPrograms: False", "*textMode: file", "*textLiteral: XScreenSaver", -"*textFile: /usr/X11R6/lib/X11/doc/README", +"*textFile: /usr/X11R6/README", "*textProgram: fortune", "*textURL: http://www.livejournal.com/stats/latest-rss.bml", "*overlayTextForeground: #FFFF00", @@ -45,11 +45,10 @@ "*demoCommand: xscreensaver-demo", "*prefsCommand: xscreensaver-demo -prefs", "*helpURL: http://www.jwz.org/xscreensaver/man.html", -"*loadURL: gnome-open '%s'", -"*manualCommand: gnome-terminal --title '%s manual' \ - --command '/bin/sh -c \"man %s; read foo\"'", +"*loadURL: firefox '%s' || mozilla '%s' || netscape '%s'", +"*manualCommand: xterm -sb -fg black -bg gray75 -T '%s manual' \ + -e /bin/sh -c 'man \"%s\" ; read foo'", "*dateFormat: %d-%b-%y (%a); %I:%M %p", -"*newLoginCommand: /bin/false", "*installColormap: True", "*programs: \ \"Qix (solid)\" qix -root -solid -segments 100 \\n\ @@ -216,6 +215,7 @@ substrate -root \\n\ \"Substrate (circles)\" substrate -root -circle-percent 33 \\n\ intermomentary -root \\n\ + interaggregate -root \\n\ fireworkx -root \\n\ fiberlamp -root \\n\ boxfit -root \\n\ @@ -298,6 +298,10 @@ GL: boing -root -lighting -smooth \\n\ - GL: carousel -root \\n\ GL: fliptext -root \\n\ +- GL: antmaze -root \\n\ + GL: tangram -root \\n\ + GL: crackberg -root -flat -lit -crack \ + -color random \\n\ \ - xdaliclock -root -builtin3 -cycle \\n\ - default-n: xearth -nofork -nostars -ncolors 50 \ @@ -349,6 +353,7 @@ "*passwd.user.label: Username:", "*passwd.passwd.label: Password:", "*passwd.thermometer.width: 8", +"*passwd.asterisks: True", "*splash.heading.label: XScreenSaver %s", "*splash.body.label: Copyright © 1991-2005 by", "*splash.body2.label: Jamie Zawinski ", diff --git a/driver/dpms.c b/driver/dpms.c index 5d678f8c..b45f4d2f 100644 --- a/driver/dpms.c +++ b/driver/dpms.c @@ -1,5 +1,5 @@ /* dpms.c --- syncing the X Display Power Management values - * xscreensaver, Copyright (c) 2001 Jamie Zawinski + * xscreensaver, Copyright (c) 2001, 2005 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -10,6 +10,40 @@ * implied warranty. */ +/* Display Power Management System (DPMS.) + + On XFree86 systems, "man xset" reports: + + -dpms The -dpms option disables DPMS (Energy Star) features. + +dpms The +dpms option enables DPMS (Energy Star) features. + + dpms flags... + The dpms option allows the DPMS (Energy Star) + parameters to be set. The option can take up to three + numerical values, or the `force' flag followed by a + DPMS state. The `force' flags forces the server to + immediately switch to the DPMS state specified. The + DPMS state can be one of `standby', `suspend', or + `off'. When numerical values are given, they set the + inactivity period before the three modes are activated. + The first value given is for the `standby' mode, the + second is for the `suspend' mode, and the third is for + the `off' mode. Setting these values implicitly + enables the DPMS features. A value of zero disables a + particular mode. + + However, note that the implementation is more than a little bogus, + in that there is code in /usr/X11R6/lib/libXdpms.a to implement all + the usual server-extension-querying utilities -- but there are no + prototypes in any header file! Thus, the prototypes here. (The + stuff in X11/extensions/dpms.h and X11/extensions/dpmsstr.h define + the raw X protcol, they don't define the API to libXdpms.a.) + + Some documentation: + Library: ftp://ftp.x.org/pub/R6.4/xc/doc/specs/Xext/DPMSLib.ms + Protocol: ftp://ftp.x.org/pub/R6.4/xc/doc/specs/Xext/DPMS.ms + */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -17,7 +51,7 @@ #include #include -#ifdef HAVE_DPMS_EXTENSION +#ifdef HAVE_DPMS_EXTENSION /* almost the whole file */ # include # include @@ -25,15 +59,17 @@ /* Why this crap is not in a header file somewhere, I have no idea. Losers! */ - extern Bool DPMSQueryExtension (Display *dpy, int *event_ret, int *err_ret); - extern Bool DPMSCapable (Display *dpy); - extern Status DPMSInfo (Display *dpy, CARD16 *power_level, BOOL *state); - extern Status DPMSSetTimeouts (Display *dpy, - CARD16 standby, CARD16 suspend, CARD16 off); - extern Bool DPMSGetTimeouts (Display *dpy, - CARD16 *standby, CARD16 *suspend, CARD16 *off); + extern Bool DPMSQueryExtension (Display *, int *event_ret, int *err_ret); + extern Status DPMSGetVersion (Display *, int *major_ret, int *minor_ret); + extern Bool DPMSCapable (Display *); + extern Status DPMSInfo (Display *, CARD16 *power_level, BOOL *state); extern Status DPMSEnable (Display *dpy); extern Status DPMSDisable (Display *dpy); + extern Status DPMSForceLevel (Display *, CARD16 level); + extern Status DPMSSetTimeouts (Display *, CARD16 standby, CARD16 suspend, + CARD16 off); + extern Bool DPMSGetTimeouts (Display *, CARD16 *standby, + CARD16 *suspend, CARD16 *off); #endif /* HAVE_DPMS_EXTENSION */ @@ -48,13 +84,13 @@ #include "xscreensaver.h" +#ifdef HAVE_DPMS_EXTENSION + void sync_server_dpms_settings (Display *dpy, Bool enabled_p, int standby_secs, int suspend_secs, int off_secs, Bool verbose_p) { -# ifdef HAVE_DPMS_EXTENSION - int event = 0, error = 0; BOOL o_enabled = False; CARD16 o_power = 0; @@ -73,6 +109,13 @@ sync_server_dpms_settings (Display *dpy, Bool enabled_p, if (bogus_p) enabled_p = False; + /* X protocol sends these values in a CARD16, so truncate them to 16 bits. + This means that the maximum timeout is 18:12:15. + */ + if (standby_secs > 0xFFFF) standby_secs = 0xFFFF; + if (suspend_secs > 0xFFFF) suspend_secs = 0xFFFF; + if (off_secs > 0xFFFF) off_secs = 0xFFFF; + if (! DPMSQueryExtension (dpy, &event, &error)) { if (verbose_p) @@ -136,11 +179,78 @@ sync_server_dpms_settings (Display *dpy, Bool enabled_p, fprintf (stderr, "%s: set DPMS timeouts: %d %d %d.\n", blurb(), standby_secs, suspend_secs, off_secs); } +} + +Bool +monitor_powered_on_p (saver_info *si) +{ + Bool result; + int event_number, error_number; + BOOL onoff = False; + CARD16 state; -# else /* !HAVE_DPMS_EXTENSION */ + if (!DPMSQueryExtension(si->dpy, &event_number, &error_number)) + /* Server doesn't know -- assume the monitor is on. */ + result = True; + else if (!DPMSCapable(si->dpy)) + /* Server says the monitor doesn't do power management -- so it's on. */ + result = True; + + else + { + DPMSInfo(si->dpy, &state, &onoff); + if (!onoff) + /* Server says DPMS is disabled -- so the monitor is on. */ + result = True; + else + switch (state) { + case DPMSModeOn: result = True; break; /* really on */ + case DPMSModeStandby: result = False; break; /* kinda off */ + case DPMSModeSuspend: result = False; break; /* pretty off */ + case DPMSModeOff: result = False; break; /* really off */ + default: result = True; break; /* protocol error? */ + } + } + + return result; +} + +void +monitor_power_on (saver_info *si) +{ + if (!monitor_powered_on_p (si)) + { + DPMSForceLevel(si->dpy, DPMSModeOn); + XSync(si->dpy, False); + if (!monitor_powered_on_p (si)) + fprintf (stderr, + "%s: DPMSForceLevel(dpy, DPMSModeOn) did not power the monitor on?\n", + blurb()); + } +} + +#else /* !HAVE_DPMS_EXTENSION */ + +void +sync_server_dpms_settings (Display *dpy, Bool enabled_p, + int standby_secs, int suspend_secs, int off_secs, + Bool verbose_p) +{ if (verbose_p) fprintf (stderr, "%s: DPMS support not compiled in.\n", blurb()); +} + +Bool +monitor_powered_on_p (saver_info *si) +{ + return True; +} -# endif /* HAVE_DPMS_EXTENSION */ +void +monitor_power_on (saver_info *si) +{ + return; } + +#endif /* !HAVE_DPMS_EXTENSION */ diff --git a/driver/lock.c b/driver/lock.c index 8d61981f..169880b1 100644 --- a/driver/lock.c +++ b/driver/lock.c @@ -97,6 +97,9 @@ struct passwd_dialog_data { Dimension height; Dimension border_width; + Bool show_stars_p; /* "I regret that I have but one asterisk for my country." + -- Nathan Hale, 1776. */ + char *heading_label; char *body_label; char *user_label; @@ -191,6 +194,8 @@ make_passwd_window (saver_info *si) pw->ratio = 1.0; + pw->show_stars_p = get_boolean_resource("passwd.asterisks", "Boolean"); + pw->heading_label = get_string_resource ("passwd.heading.label", "Dialog.Label.Label"); pw->body_label = get_string_resource ("passwd.body.label", @@ -1384,6 +1389,10 @@ handle_passwd_key (saver_info *si, XKeyEvent *event) s[1] = 0; + /* Add 10% to the time remaining every time a key is pressed. */ + pw->ratio += 0.1; + if (pw->ratio > 1) pw->ratio = 1; + switch (*s) { case '\010': case '\177': /* Backspace */ @@ -1426,12 +1435,19 @@ handle_passwd_key (saver_info *si, XKeyEvent *event) break; } - i = strlen(typed_passwd); - stars = (char *) malloc(i+1); - memset (stars, '*', i); - stars[i] = 0; - update_passwd_window (si, stars, pw->ratio); - free (stars); + if (pw->show_stars_p) + { + i = strlen(typed_passwd); + stars = (char *) malloc(i+1); + memset (stars, '*', i); + stars[i] = 0; + update_passwd_window (si, stars, pw->ratio); + free (stars); + } + else + { + update_passwd_window (si, "", pw->ratio); + } } diff --git a/driver/passwd-helper.c b/driver/passwd-helper.c index 7b23f05a..7d41d628 100644 --- a/driver/passwd-helper.c +++ b/driver/passwd-helper.c @@ -1,6 +1,6 @@ /* passwd-helper.c --- verifying typed passwords with external helper program * written by Olaf Kirch - * xscreensaver, Copyright (c) 1993-2004 Jamie Zawinski + * xscreensaver, Copyright (c) 1993-2005 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -35,14 +35,23 @@ #ifndef NO_LOCKING /* whole file */ +#include /* not used for much... */ + +/* This file doesn't need the Xt headers, so stub these types out... */ +#undef XtPointer +#define XtAppContext void* +#define XrmDatabase void* +#define XtIntervalId void* +#define XtPointer void* +#define Widget void* + +#include "xscreensaver.h" + #include #ifdef HAVE_UNISTD_H # include #endif -extern char *blurb(void); - - #include #include #include @@ -51,9 +60,6 @@ extern char *blurb(void); #include -extern void block_sigchld (void); -extern void unblock_sigchld (void); - static int ext_run (const char *user, const char *typed_passwd, int verbose_p) { diff --git a/driver/passwd-kerberos.c b/driver/passwd-kerberos.c index 398fc3c2..bb8d9926 100644 --- a/driver/passwd-kerberos.c +++ b/driver/passwd-kerberos.c @@ -75,7 +75,7 @@ static char realm[REALM_SZ]; static char name[ANAME_SZ]; static char inst[INST_SZ]; - static char *tk_file; + static const char *tk_file; #endif /* !HAVE_DARWIN */ @@ -222,7 +222,7 @@ kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p) des_string_to_key(typed_passwd, mitkey); if (krb_get_in_tkt(name, inst, realm, "krbtgt", realm, DEFAULT_TKT_LIFE, - key_to_key, NULL, mitkey) != 0) { + key_to_key, NULL, (char *) mitkey) != 0) { success = False; } else { success = True; diff --git a/driver/prefs.c b/driver/prefs.c index a4d8103c..d34d2935 100644 --- a/driver/prefs.c +++ b/driver/prefs.c @@ -1590,8 +1590,8 @@ stop_the_insanity (saver_preferences *p) p->watchdog_timeout = p->cycle * 0.6; - if (p->watchdog_timeout < 30000) p->watchdog_timeout = 30000; /* 30 secs */ - if (p->watchdog_timeout > 3600000) p->watchdog_timeout = 3600000; /* 1 hr */ + if (p->watchdog_timeout < 27000) p->watchdog_timeout = 27000; /* 27 secs */ + if (p->watchdog_timeout > 57000) p->watchdog_timeout = 57000; /* 57 secs */ if (p->pointer_hysteresis < 0) p->pointer_hysteresis = 0; if (p->pointer_hysteresis > 100) p->pointer_hysteresis = 100; diff --git a/driver/setuid.c b/driver/setuid.c index 72228a52..74d8318b 100644 --- a/driver/setuid.c +++ b/driver/setuid.c @@ -74,6 +74,42 @@ describe_uids (saver_info *si, FILE *out) } +/* Returns true if we need to call setgroups(). + + Without calling setgroups(), the process will retain any supplementary + gids associated with the uid, e.g.: + + % groups root + root : root bin daemon sys adm disk wheel + + However, setgroups() can only be called by root, and returns EPERM + for other users even if the call would be a no-op (e.g., setting the + group list to the current list.) So, to avoid that spurious error, + before calling setgroups() we first check whether the current list + of groups contains only one element, our target group. If so, we + don't need to call setgroups(). + */ +static int +setgroups_needed_p (uid_t target_group) +{ + gid_t groups[1024]; + int n = getgroups (sizeof(groups)-1, groups); + if (n < 0) + { + char buf [1024]; + sprintf (buf, "%s: getgroups(%d, ...)", blurb(), sizeof(groups)-1); + perror (buf); + return 1; + } + else if (n == 0) /* an empty list means only egid is in effect. */ + return 0; + else if (n == 1 && groups[0] == target_group) /* one element, the target */ + return 0; + else /* more than one, or the wrong one. */ + return 1; +} + + static int set_ids_by_number (uid_t uid, gid_t gid, char **message_ret) { @@ -98,7 +134,8 @@ set_ids_by_number (uid_t uid, gid_t gid, char **message_ret) if (uid == (uid_t) -1) uid = (uid_t) -2; errno = 0; - if (setgroups (1, &gid) < 0) + if (setgroups_needed_p (gid) && + setgroups (1, &gid) < 0) sgs_errno = errno ? errno : -1; errno = 0; @@ -123,6 +160,9 @@ set_ids_by_number (uid_t uid, gid_t gid, char **message_ret) else { char buf [1024]; + gid_t groups[1024]; + int n; + if (sgs_errno) { sprintf (buf, "%s: couldn't setgroups to %.100s (%ld)", @@ -136,7 +176,25 @@ set_ids_by_number (uid_t uid, gid_t gid, char **message_ret) errno = sgs_errno; perror(buf); } - } + + fprintf (stderr, "%s: effective group list: ", blurb()); + n = getgroups (sizeof(groups)-1, groups); + if (n < 0) + fprintf (stderr, "unknown!\n"); + else + { + int i; + fprintf (stderr, "["); + for (i = 0; i < n; i++) + { + g = getgrgid (groups[i]); + if (i > 0) fprintf (stderr, ", "); + if (g && g->gr_name) fprintf (stderr, "%s", g->gr_name); + else fprintf (stderr, "%ld", (long) groups[i]); + } + fprintf (stderr, "]\n"); + } + } if (gid_errno) { diff --git a/driver/subprocs.c b/driver/subprocs.c index bef3beda..ffabe483 100644 --- a/driver/subprocs.c +++ b/driver/subprocs.c @@ -775,7 +775,7 @@ spawn_screenhack_1 (saver_screen_info *ssi, Bool first_time_p) /* Use the same hack that's running on screen 0. (Assumes this function was called on screen 0 first.) */ - ssi->current_hack = si->screens[0].current_hack; + new_hack = si->screens[0].current_hack; } else /* (p->mode == RANDOM_HACKS) */ { diff --git a/driver/test-uid.c b/driver/test-uid.c index 0a75fcf4..dd4893e8 100644 --- a/driver/test-uid.c +++ b/driver/test-uid.c @@ -1,5 +1,5 @@ /* test-uid.c --- playing with setuid. - * xscreensaver, Copyright (c) 1998 Jamie Zawinski + * xscreensaver, Copyright (c) 1998, 2005 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -36,6 +36,8 @@ print(void) int egid = getegid(); struct passwd *p = 0; struct group *g = 0; + gid_t groups[1024]; + int n; p = getpwuid (uid); g = getgrgid (gid); @@ -48,6 +50,23 @@ print(void) fprintf(stderr, "eff. user/group: %ld/%ld (%s/%s)\n", (long)euid, (long)egid, (p && p->pw_name ? p->pw_name : "???"), (g && g->gr_name ? g->gr_name : "???")); + + n = getgroups(sizeof(groups)-1, groups); + if (n < 0) + perror("getgroups failed"); + else + { + int i; + fprintf (stderr, "eff. group list: ["); + for (i = 0; i < n; i++) + { + g = getgrgid (groups[i]); + fprintf(stderr, "%s%s=%ld", (i == 0 ? "" : ", "), + (g->gr_name ? g->gr_name : "???"), + groups[i]); + } + fprintf (stderr, "]\n"); + } } int @@ -114,6 +133,15 @@ main (int argc, char **argv) } } + fprintf(stderr, "setgroups(1, [%ld]) \"%s\"", gid, group); + { + gid_t g2 = gid; + if (setgroups(1, &g2) == 0) + fprintf(stderr, " succeeded.\n"); + else + perror(" failed"); + } + fprintf(stderr, "setgid(%ld) \"%s\"", gid, group); if (setgid(gid) == 0) fprintf(stderr, " succeeded.\n"); diff --git a/driver/timers.c b/driver/timers.c index c9244f73..1f432142 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -386,11 +386,17 @@ pointer_moved_p (saver_screen_info *ssi, Bool mods_p) distance > 0) moved_p = True; - if (ssi->poll_mouse_last_root_x == -1 || - ssi->poll_mouse_last_root_y == -1 || - root_x == -1 || - root_y == -1) - moved_p = True; + /* If the mouse is not on this screen but used to be, that's motion. + If the mouse was not on this screen, but is now, that's motion. + */ + { + Bool on_screen_p = (root_x != -1 && root_y != -1); + Bool was_on_screen_p = (ssi->poll_mouse_last_root_x != -1 && + ssi->poll_mouse_last_root_y != -1); + + if (on_screen_p != was_on_screen_p) + moved_p = True; + } if (p->debug_p && (distance != 0 || moved_p)) { @@ -404,7 +410,7 @@ pointer_moved_p (saver_screen_info *ssi, Bool mods_p) ssi->poll_mouse_last_root_y); fprintf (stderr, " -> "); if (root_x == -1) - fprintf (stderr, "off screen."); + fprintf (stderr, "off screen"); else fprintf (stderr, "%d,%d", root_x, root_y); if (ssi->poll_mouse_last_root_x != -1 && root_x != -1) diff --git a/driver/windows.c b/driver/windows.c index 60de0a92..e9891af7 100644 --- a/driver/windows.c +++ b/driver/windows.c @@ -1978,7 +1978,7 @@ unblank_screen (saver_info *si) /* If the focus window does has a non-default colormap, then install that colormap as well. (On SGIs, this will cause both the root map - and the focus map to be installed simultaniously. It'd be nice to + and the focus map to be installed simultaneously. It'd be nice to pick up the other colormaps that had been installed, too; perhaps XListInstalledColormaps could be used for that?) */ diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c index fe08d2ea..6c039fb2 100644 --- a/driver/xscreensaver-command.c +++ b/driver/xscreensaver-command.c @@ -95,9 +95,8 @@ usage: %s -