From 278c59e14c53fd412b734e699bd4f314f766f804 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Mon, 2 Mar 2009 00:42:34 -0500 Subject: [PATCH] http://apple.doit.wisc.edu/mirrors/amug/linux/linuxppc/sources/tarballs/xscreensaver-3.12.tar.gz -rw-r--r-- 1 zblaxell zblaxell 1096554 May 11 1999 xscreensaver-3.12.tar.gz 05e6cd8efe68b24d507581bb11a7c6adf958028c xscreensaver-3.12.tar.gz --- README | 42 +- config.h.in | 35 +- configure | 1085 +++++++++++++------ configure.in | 190 +++- driver/Makefile.in | 13 +- driver/XScreenSaver.ad.in | 70 +- driver/XScreenSaver_ad.h | 31 +- driver/demo.c | 1 - driver/lock.c | 128 ++- driver/passwd-pam.c | 113 +- driver/passwd-pwent.c | 6 + driver/passwd.c | 12 +- driver/prefs.c | 10 +- driver/prefs.h | 6 - driver/setuid.c | 10 - driver/splash.c | 12 +- driver/stderr.c | 16 +- driver/subprocs.c | 11 + driver/test-passwd.c | 59 +- driver/timers.c | 164 ++- driver/windows.c | 204 +++- driver/xscreensaver-command.c | 17 +- driver/xscreensaver-command.man | 19 +- driver/xscreensaver-demo.man | 2 +- driver/xscreensaver.c | 199 +++- driver/xscreensaver.h | 30 +- driver/xscreensaver.man | 62 +- hacks/flag.c | 10 +- hacks/glx/Makefile.in | 15 +- hacks/glx/pipes.c | 3 +- hacks/glx/pulsar.c | 317 +++--- hacks/glx/xlock-gl.c | 85 +- hacks/images/matrix.xpm | 1796 +++++++++++++++---------------- hacks/phosphor.c | 4 +- hacks/screenhack.c | 39 +- hacks/sonar.c | 72 +- hacks/xjack.c | 53 +- hacks/xlockmoreI.h | 4 - hacks/xmatrix.c | 2 +- utils/Makefile.in | 11 +- utils/compile_axp.com | 1 + utils/compile_decc.com | 1 + utils/version.h | 2 +- utils/visual-gl.c | 99 ++ utils/visual.c | 74 +- utils/visual.h | 4 +- xscreensaver.lsm | 16 +- xscreensaver.spec | 2 +- 48 files changed, 3348 insertions(+), 1809 deletions(-) create mode 100644 utils/visual-gl.c diff --git a/README b/README index 417e248a..9599795b 100644 --- a/README +++ b/README @@ -58,7 +58,7 @@ locking mode, when the proper password is typed.) It is trivially easy to add new display modes to xscreensaver: any program which can be invoked in such a way that it draws on the root window of the -screen can be used as a screensaver. You just change a resource setting -- +screen can be used as a screensaver. You just change a config file -- there's no need to recompile or reinstall anything. ============ @@ -77,6 +77,46 @@ http://www.jwz.org/xscreensaver/. ============ +Changes since 3.11: * Made it so that you can't scroll the screen while the + lock dialog is up (with XFree86 virtual viewports.) + * Fixed a bug in `flag' that caused bob's chin to get cut + off after a few iterations. +Changes since 3.10: * Made `xjack' be black-on-white-ish, so that it looks + less like a computer screen and more like the + typewritten paper it's supposed to be. + * New version of `pulsar'. + * Fixed Solaris compilation problem in `phosphor'. + * Made xscreensaver notice XFree86's virtual root window + hack, so that if the X server's root window is larger + than the monitor's displayable resolution, the screen + saver will limit itself to the area that actually + appears on the screen. + * Made the xscreensaver daemon do a better job of + picking the visual class that should be used for GL + programs. Less user intervention should be needed + now: you can use the logical visual name `GL' instead + of having to figure out by hand which one to use. + * Oops, the visual was defaulting to "best" instead of + "default", because the .xscreensaver file was not being + loaded quite early enough. + * Made configure figure out how to build icmp ping + support into the `sonar' hack automatically. + * Made warnings about not being able to read shadow + passwords not be printed if compiled with PAM support. + * Improved PAM startup diagnostics. + * Worked around the Solaris PAM bug that was causing + crashes there, so now PAM is turned on by default. + * Made configure detect the number of arguments that + pam_strerror() takes, since on Linux, this apparently + changed between 2.0 and 2.2, sigh. + * Made the /proc/interrupts kludge look for "PS/2 Mouse" + as well as "keyboard". + * Made xscreensaver notice when there has been a sudden + large jump in wall-clock time, and if so, lock right + away, instead of waiting for "lockTimeout" to expire + first. (Laptops need this for safer recovery from + ``hibernation.'') + * Added `-throttle' option to `xscreensaver-command'. Changes since 3.09: * Added `phosphor', `xmatrix', and `pulsar' hacks. * Fixed a bug in the color allocator that sometimes caused `starfish' to fall back to monochrome. diff --git a/config.h.in b/config.h.in index 5707bd8c..1d5cd07a 100644 --- a/config.h.in +++ b/config.h.in @@ -96,6 +96,14 @@ */ #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 you have a Linux-like /proc/interrupts file which can be * examined to determine when keyboard activity has occurred. */ @@ -147,6 +155,15 @@ */ #undef HAVE_GLBINDTEXTURE +/* Define this if the `xscreensaver' process itself (the driver process) + should be linked against GL. Most systems won't want this (in particular, + if you're using Linux and/or Mesa, you don't want this) but SGI systems + do want this. It may also be useful on other systems that have serious + GL support -- you only need this if you have a lot of different visuals, + not all of which work with GL programs. + */ +#undef DAEMON_USE_GL + /* Define this if you have the X Shared Memory Extension. */ #undef HAVE_XSHM_EXTENSION @@ -197,11 +214,14 @@ */ #define PAM_SERVICE_NAME "xscreensaver" +/* Define if you have PAM and pam_strerror() requires two arguments. */ +#undef PAM_STRERROR_TWO_ARGS + /* 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.c if - * you're having trouble related to reading passwords.) + * 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 @@ -228,7 +248,8 @@ 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. + 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 @@ -319,3 +340,11 @@ This is necessary at least on SCO OpenServer 5, due to a Unix kernel bug. */ #undef USE_SIGACTION + +/* Define this if you do pings with a `struct icmp' and a `icmp_id' slot. + */ +#undef HAVE_ICMP + +/* Define this if you do pings with a `struct icmphdr' and a `un.echo.id' slot. + */ +#undef HAVE_ICMPHDR diff --git a/configure b/configure index 5d61f180..412bc5ed 100755 --- a/configure +++ b/configure @@ -60,6 +60,10 @@ ac_help="$ac_help --with-dpms-ext Include support for the DPMS server extension, if possible (this is the default). --without-dpms-ext Do not compile in support for this extension." +ac_help="$ac_help + --with-xf86vmode-ext Include support for XFree86 virtual screens, if + possible (this is the default). + --without-xf86vmode-ext Do not compile in support for this extension." ac_help="$ac_help --with-proc-interrupts Include support for consulting the /proc/interrupts file to notice keyboard activity, if possible. @@ -662,7 +666,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:677: checking host system type" >&5 +echo "configure:681: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -686,7 +690,7 @@ echo "$ac_t""$host" 1>&6 # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:701: checking for $ac_word" >&5 +echo "configure:705: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -716,7 +720,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:731: checking for $ac_word" >&5 +echo "configure:735: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -767,7 +771,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:782: checking for $ac_word" >&5 +echo "configure:786: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -799,7 +803,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:818: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -810,12 +814,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 825 "configure" +#line 829 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -841,12 +845,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:860: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:861: checking whether we are using GNU C" >&5 +echo "configure:865: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -855,7 +859,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -874,7 +878,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:889: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:893: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -908,7 +912,7 @@ fi if test -z "$GCC"; then echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6 -echo "configure:923: checking how to request ANSI compilation" >&5 +echo "configure:927: checking how to request ANSI compilation" >&5 case "$host" in *-hpux*) echo "$ac_t""HPUX: adding -Ae" 1>&6 @@ -932,16 +936,16 @@ fi echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6 -echo "configure:947: checking whether the compiler works on ANSI C" >&5 +echo "configure:951: checking whether the compiler works on ANSI C" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -990,7 +994,7 @@ esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1005: checking how to run the C preprocessor" >&5 +echo "configure:1009: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1005,13 +1009,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1022,13 +1026,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1039,13 +1043,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1081,7 +1085,7 @@ echo "$ac_t""$CPP" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1096: checking for a BSD compatible install" >&5 +echo "configure:1100: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1135,7 +1139,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' INSTALL_DIRS='${INSTALL} -d' echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6 -echo "configure:1150: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5 +echo "configure:1154: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5 rm -rf conftestdir if mkdir conftestdir; then cd conftestdir >&- @@ -1146,7 +1150,7 @@ echo "configure:1150: checking whether \"\${INSTALL} -d\" creates intermediate d else echo "$ac_t""no" 1>&6 echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6 -echo "configure:1161: checking whether \"mkdir -p\" creates intermediate directories" >&5 +echo "configure:1165: checking whether \"mkdir -p\" creates intermediate directories" >&5 rm -rf dir1 mkdir -p dir1/dir2 >&- 2>&- if test -d dir1/dir2/. ; then @@ -1161,7 +1165,7 @@ echo "configure:1161: checking whether \"mkdir -p\" creates intermediate directo fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1176: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1180: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1189,12 +1193,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1204: checking for working const" >&5 +echo "configure:1208: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1264,21 +1268,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1279: checking for inline" >&5 +echo "configure:1283: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1305,12 +1309,12 @@ esac echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1320: checking for ANSI C header files" >&5 +echo "configure:1324: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1318,7 +1322,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1335,7 +1339,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1353,7 +1357,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1374,7 +1378,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1385,7 +1389,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1409,12 +1413,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1424: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1428: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1423,7 +1427,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1444,12 +1448,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1459: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1463: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1465,7 +1469,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1490,12 +1494,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1505: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1509: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1503,7 +1507,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1528,7 +1532,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1543: checking for opendir in -ldir" >&5 +echo "configure:1547: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1536,7 +1540,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1569,7 +1573,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1584: checking for opendir in -lx" >&5 +echo "configure:1588: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1577,7 +1581,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1612,12 +1616,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:1627: checking for mode_t" >&5 +echo "configure:1631: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1645,12 +1649,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1660: checking for pid_t" >&5 +echo "configure:1664: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1678,12 +1682,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1693: checking for size_t" >&5 +echo "configure:1697: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1711,12 +1715,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1726: checking return type of signal handlers" >&5 +echo "configure:1730: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1733,7 +1737,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1753,12 +1757,12 @@ EOF echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6 -echo "configure:1768: checking how to call gettimeofday" >&5 +echo "configure:1772: checking how to call gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1767,7 +1771,7 @@ struct timeval tv; struct timezone tzp; gettimeofday(&tv, &tzp); ; return 0; } EOF -if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_gettimeofday_args=2 else @@ -1775,7 +1779,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < #include @@ -1783,7 +1787,7 @@ int main() { struct timeval tv; gettimeofday(&tv); ; return 0; } EOF -if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_gettimeofday_args=1 else @@ -1823,12 +1827,12 @@ fi for ac_func in select fcntl uname nice setpriority getcwd getwd putenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1838: checking for $ac_func" >&5 +echo "configure:1842: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1878,12 +1882,12 @@ done for ac_func in sigaction syslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1893: checking for $ac_func" >&5 +echo "configure:1897: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1935,17 +1939,17 @@ for ac_hdr in unistd.h crypt.h sys/select.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1950: checking for $ac_hdr" >&5 +echo "configure:1954: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2007,7 +2011,7 @@ HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'` # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:2022: checking for X" >&5 +echo "configure:2026: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2069,12 +2073,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2143,14 +2147,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2256,17 +2260,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2271: checking whether -R must be followed by a space" >&5 +echo "configure:2275: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -2282,14 +2286,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -2321,7 +2325,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2336: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2340: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2329,7 +2333,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2362,7 +2366,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2377: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2381: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2370,7 +2374,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2410,12 +2414,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2425: checking for gethostbyname" >&5 +echo "configure:2429: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2459,7 +2463,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2474: checking for gethostbyname in -lnsl" >&5 +echo "configure:2478: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2467,7 +2471,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2508,12 +2512,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2523: checking for connect" >&5 +echo "configure:2527: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2557,7 +2561,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2572: checking for connect in -lsocket" >&5 +echo "configure:2576: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2565,7 +2569,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2600,12 +2604,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2615: checking for remove" >&5 +echo "configure:2619: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2649,7 +2653,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2664: checking for remove in -lposix" >&5 +echo "configure:2668: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2657,7 +2661,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2692,12 +2696,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2707: checking for shmat" >&5 +echo "configure:2711: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2741,7 +2745,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2756: checking for shmat in -lipc" >&5 +echo "configure:2760: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2749,7 +2753,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2793,7 +2797,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2808: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2812: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2801,7 +2805,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2854,7 +2858,7 @@ fi echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6 -echo "configure:2869: checking for X app-defaults directory" >&5 +echo "configure:2873: checking for X app-defaults directory" >&5 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3001,7 +3005,7 @@ APPDEFAULTS=$ac_x_app_defaults fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < EOF @@ -3022,7 +3026,7 @@ rm -f conftest* # Check for the availability of the XPointer typedef, and define it otherwise. # echo $ac_n "checking for XPointer""... $ac_c" 1>&6 -echo "configure:3037: checking for XPointer" >&5 +echo "configure:3041: checking for XPointer" >&5 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3033,14 +3037,14 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < int main() { XPointer foo = (XPointer) 0; ; return 0; } EOF -if { (eval echo configure:3055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_xpointer=yes else @@ -3174,7 +3178,7 @@ case "$host" in # Some versions of Slowlaris Motif require -lgen. But not all. Why? echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6 -echo "configure:3189: checking for regcmp in -lgen" >&5 +echo "configure:3193: checking for regcmp in -lgen" >&5 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3182,7 +3186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3230,17 +3234,17 @@ have_xmu=no CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6 -echo "configure:3245: checking for X11/Xmu/Error.h" >&5 +echo "configure:3249: checking for X11/Xmu/Error.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3285,7 +3289,7 @@ if test "$have_xmu" = yes ; then case "$host" in *-sunos4*) echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6 -echo "configure:3300: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5 +echo "configure:3304: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3298,14 +3302,14 @@ else # with X libraries because we know it's SunOS. LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_sunos_xmu_bug=no else @@ -3321,21 +3325,21 @@ fi echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6 if test "$ac_cv_sunos_xmu_bug" = yes ; then echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6 -echo "configure:3336: checking whether the compiler understands -static" >&5 +echo "configure:3340: checking whether the compiler understands -static" >&5 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -static" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_ld_static=yes else @@ -3380,7 +3384,7 @@ fi /*) echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6 -echo "configure:3395: checking for SGI SCREEN_SAVER headers" >&5 +echo "configure:3399: checking for SGI SCREEN_SAVER headers" >&5 d=$with_sgi/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -3390,7 +3394,7 @@ echo "configure:3395: checking for SGI SCREEN_SAVER headers" >&5 fi echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6 -echo "configure:3405: checking for SGI SCREEN_SAVER libs" >&5 +echo "configure:3409: checking for SGI SCREEN_SAVER libs" >&5 d=$with_sgi/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -3428,17 +3432,17 @@ if test "$with_sgi" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6 -echo "configure:3443: checking for X11/extensions/XScreenSaver.h" >&5 +echo "configure:3447: checking for X11/extensions/XScreenSaver.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3491,7 +3495,7 @@ fi /*) echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6 -echo "configure:3506: checking for MIT-SCREEN-SAVER headers" >&5 +echo "configure:3510: checking for MIT-SCREEN-SAVER headers" >&5 d=$with_mit/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -3501,7 +3505,7 @@ echo "configure:3506: checking for MIT-SCREEN-SAVER headers" >&5 fi echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6 -echo "configure:3516: checking for MIT-SCREEN-SAVER libs" >&5 +echo "configure:3520: checking for MIT-SCREEN-SAVER libs" >&5 d=$with_mit/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -3540,17 +3544,17 @@ if test "$have_sgi" != yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6 -echo "configure:3555: checking for X11/extensions/scrnsaver.h" >&5 +echo "configure:3559: checking for X11/extensions/scrnsaver.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3594,7 +3598,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6 -echo "configure:3609: checking for XScreenSaverRegister in -lXext" >&5 +echo "configure:3613: checking for XScreenSaverRegister in -lXext" >&5 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3602,7 +3606,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3664,7 +3668,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6 -echo "configure:3679: checking for XScreenSaverRegister in -lXExExt" >&5 +echo "configure:3683: checking for XScreenSaverRegister in -lXExExt" >&5 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3672,7 +3676,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXExExt -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3729,7 +3733,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6 -echo "configure:3744: checking for XScreenSaverRegister in -lXss" >&5 +echo "configure:3748: checking for XScreenSaverRegister in -lXss" >&5 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3737,7 +3741,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXss -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3808,7 +3812,7 @@ fi /*) echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6 -echo "configure:3823: checking for XIDLE headers" >&5 +echo "configure:3827: checking for XIDLE headers" >&5 d=$with_xidle/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -3818,7 +3822,7 @@ echo "configure:3823: checking for XIDLE headers" >&5 fi echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6 -echo "configure:3833: checking for XIDLE libs" >&5 +echo "configure:3837: checking for XIDLE libs" >&5 d=$with_xidle/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -3856,17 +3860,17 @@ if test "$with_xidle" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6 -echo "configure:3871: checking for X11/extensions/xidle.h" >&5 +echo "configure:3875: checking for X11/extensions/xidle.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3918,7 +3922,7 @@ fi /*) echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6 -echo "configure:3933: checking for XSHM headers" >&5 +echo "configure:3937: checking for XSHM headers" >&5 d=$with_xshm/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -3928,7 +3932,7 @@ echo "configure:3933: checking for XSHM headers" >&5 fi echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6 -echo "configure:3943: checking for XSHM libs" >&5 +echo "configure:3947: checking for XSHM libs" >&5 d=$with_xshm/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -3968,17 +3972,17 @@ if test "$with_xshm" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6 -echo "configure:3983: checking for X11/extensions/XShm.h" >&5 +echo "configure:3987: checking for X11/extensions/XShm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4012,17 +4016,17 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:4027: checking for sys/ipc.h" >&5 +echo "configure:4031: checking for sys/ipc.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4057,17 +4061,17 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6 -echo "configure:4072: checking for sys/shm.h" >&5 +echo "configure:4076: checking for sys/shm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4116,7 +4120,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6 -echo "configure:4131: checking for XShmQueryExtension in -lXextSam" >&5 +echo "configure:4135: checking for XShmQueryExtension in -lXextSam" >&5 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4124,7 +4128,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXextSam -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4194,7 +4198,7 @@ fi /*) echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6 -echo "configure:4209: checking for DOUBLE-BUFFER headers" >&5 +echo "configure:4213: checking for DOUBLE-BUFFER headers" >&5 d=$with_xdbe/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -4204,7 +4208,7 @@ echo "configure:4209: checking for DOUBLE-BUFFER headers" >&5 fi echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6 -echo "configure:4219: checking for DOUBLE-BUFFER libs" >&5 +echo "configure:4223: checking for DOUBLE-BUFFER libs" >&5 d=$with_xdbe/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -4243,17 +4247,17 @@ if test "$with_xdbe" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6 -echo "configure:4258: checking for X11/extensions/Xdbe.h" >&5 +echo "configure:4262: checking for X11/extensions/Xdbe.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4308,7 +4312,7 @@ fi /*) echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6 -echo "configure:4323: checking for SGI-VIDEO-CONTROL headers" >&5 +echo "configure:4327: checking for SGI-VIDEO-CONTROL headers" >&5 d=$with_sgivc/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -4318,7 +4322,7 @@ echo "configure:4323: checking for SGI-VIDEO-CONTROL headers" >&5 fi echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6 -echo "configure:4333: checking for SGI-VIDEO-CONTROL libs" >&5 +echo "configure:4337: checking for SGI-VIDEO-CONTROL libs" >&5 d=$with_sgivc/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -4358,17 +4362,17 @@ if test "$with_sgivc" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6 -echo "configure:4373: checking for X11/extensions/XSGIvc.h" >&5 +echo "configure:4377: checking for X11/extensions/XSGIvc.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4411,7 +4415,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6 -echo "configure:4426: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5 +echo "configure:4430: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4419,7 +4423,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXsgivc -lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4488,7 +4492,7 @@ fi /*) echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6 -echo "configure:4503: checking for DPMS headers" >&5 +echo "configure:4507: checking for DPMS headers" >&5 d=$with_dpms/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -4498,7 +4502,7 @@ echo "configure:4503: checking for DPMS headers" >&5 fi echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6 -echo "configure:4513: checking for DPMS libs" >&5 +echo "configure:4517: checking for DPMS libs" >&5 d=$with_dpms/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -4538,17 +4542,17 @@ if test "$with_dpms" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6 -echo "configure:4553: checking for X11/extensions/dpms.h" >&5 +echo "configure:4557: checking for X11/extensions/dpms.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4591,7 +4595,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6 -echo "configure:4606: checking for DPMSInfo in -lXdpms" >&5 +echo "configure:4610: checking for DPMSInfo in -lXdpms" >&5 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4599,7 +4603,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXdpms -lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4648,6 +4652,186 @@ elif test "$with_dpms" != no; then fi +# Check for the XF86VMODE server extension header. +# +have_xf86vmode=no +with_xf86vmode_req=unspecified +# Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given. +if test "${with_xf86vmode_ext+set}" = set; then + withval="$with_xf86vmode_ext" + with_xf86vmode="$withval"; with_xf86vmode_req="$withval" +else + with_xf86vmode=yes +fi + + + + case "$with_xf86vmode" in + yes) ;; + no) ;; + + /*) + echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6 +echo "configure:4687: checking for xf86vmode headers" >&5 + d=$with_xf86vmode/include + if test -d $d; then + X_CFLAGS="-I$d $X_CFLAGS" + echo "$ac_t""$d" 1>&6 + else + echo "$ac_t""not found ($d: no such directory)" 1>&6 + fi + + echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6 +echo "configure:4697: checking for xf86vmode libs" >&5 + d=$with_xf86vmode/lib + if test -d $d; then + X_LIBS="-L$d $X_LIBS" + echo "$ac_t""$d" 1>&6 + else + echo "$ac_t""not found ($d: no such directory)" 1>&6 + fi + + # replace the directory string with "yes". + with_xf86vmode_req="yes" + with_xf86vmode=$with_xf86vmode_req + ;; + + *) + echo "" + echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory." + echo " If it is a directory, then \`DIR/include' will be added to" + echo " the -I list, and \`DIR/lib' will be added to the -L list." + exit 1 + ;; + esac + + # why is this necessary? + # if we don't do this, then "./configure --with-motif=/usr/local/lesstif" + # behaves as if "--with-zippy=/usr/local/lesstif" was also present! + withval= + + +if test "$with_xf86vmode" = yes; then + + # first check for xf86vmode.h + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6 +echo "configure:4737: checking for X11/extensions/xf86vmode.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_xf86vmode=yes +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + + # if that succeeded, then check for the -lXxf86vm + if test "$have_xf86vmode" = yes; then + have_xf86vmode=no + + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LDFLAGS="$LDFLAGS" + + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + # note: $X_CFLAGS includes $x_includes + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + + if test \! -z "$libdir" ; then + LDFLAGS="$LDFLAGS -L$libdir" + fi + # note: $X_LIBS includes $x_libraries + LDFLAGS="$LDFLAGS $X_LIBS" + + echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6 +echo "configure:4790: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5 +ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXxf86vm -lXext -lX11 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm" +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" + fi + + # if that succeeded, then we've really got it. + if test "$have_xf86vmode" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_XF86VMODE 1 +EOF + + fi + +elif test "$with_xf86vmode" != no; then + echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode" + exit 1 +fi + + # Check for /proc/interrupts # have_proc_interrupts=no @@ -4664,7 +4848,7 @@ fi if test "$with_proc_interrupts" = yes; then echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6 -echo "configure:4679: checking whether /proc/interrupts contains keyboard data" >&5 +echo "configure:4863: checking whether /proc/interrupts contains keyboard data" >&5 if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4717,7 +4901,7 @@ fi /*) echo $ac_n "checking for Motif headers""... $ac_c" 1>&6 -echo "configure:4732: checking for Motif headers" >&5 +echo "configure:4916: checking for Motif headers" >&5 d=$with_motif/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -4727,7 +4911,7 @@ echo "configure:4732: checking for Motif headers" >&5 fi echo $ac_n "checking for Motif libs""... $ac_c" 1>&6 -echo "configure:4742: checking for Motif libs" >&5 +echo "configure:4926: checking for Motif libs" >&5 d=$with_motif/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -4772,7 +4956,7 @@ fi /*) echo $ac_n "checking for Athena headers""... $ac_c" 1>&6 -echo "configure:4787: checking for Athena headers" >&5 +echo "configure:4971: checking for Athena headers" >&5 d=$with_athena/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -4782,7 +4966,7 @@ echo "configure:4787: checking for Athena headers" >&5 fi echo $ac_n "checking for Athena libs""... $ac_c" 1>&6 -echo "configure:4797: checking for Athena libs" >&5 +echo "configure:4981: checking for Athena libs" >&5 d=$with_athena/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -4845,17 +5029,17 @@ check_motif() { CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:4860: checking for Xm/Xm.h" >&5 +echo "configure:5044: checking for Xm/Xm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4895,17 +5079,17 @@ check_athena() { CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6 -echo "configure:4910: checking for X11/Xaw/Dialog.h" >&5 +echo "configure:5094: checking for X11/Xaw/Dialog.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4945,7 +5129,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6 -echo "configure:4960: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5 +echo "configure:5144: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4953,7 +5137,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5041,7 +5225,7 @@ fi # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.) if test "$have_athena" = yes ; then echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6 -echo "configure:5056: checking for XawViewportSetCoordinates in Viewport.h" >&5 +echo "configure:5240: checking for XawViewportSetCoordinates in Viewport.h" >&5 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5053,7 +5237,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < EOF @@ -5082,7 +5266,7 @@ fi have_lesstif=no if test "$have_motif" = yes ; then echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6 -echo "configure:5097: checking whether Motif is really LessTif" >&5 +echo "configure:5281: checking whether Motif is really LessTif" >&5 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5093,14 +5277,14 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < int main() { long vers = LesstifVersion; ; return 0; } EOF -if { (eval echo configure:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_lesstif=yes else @@ -5128,7 +5312,7 @@ if test "$have_lesstif" = yes ; then ltv=unknown echo unknown > conftest-lt echo $ac_n "checking LessTif version number""... $ac_c" 1>&6 -echo "configure:5143: checking LessTif version number" >&5 +echo "configure:5327: checking LessTif version number" >&5 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5143,7 +5327,7 @@ else ac_cv_lesstif_version_string=unknown else cat > conftest.$ac_ext < #include @@ -5156,7 +5340,7 @@ else exit(0); } EOF -if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ltv=`cat conftest-lt` ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'` @@ -5186,7 +5370,7 @@ if test "$have_motif" = yes ; then mtv=unknown echo unknown > conftest-mt echo $ac_n "checking Motif version number""... $ac_c" 1>&6 -echo "configure:5201: checking Motif version number" >&5 +echo "configure:5385: checking Motif version number" >&5 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5201,7 +5385,7 @@ else ac_cv_motif_version_string=unknown else cat > conftest.$ac_ext < #include @@ -5214,7 +5398,7 @@ else exit(0); } EOF -if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then mtv=`cat conftest-mt` ac_cv_motif_version=`echo $mtv | sed 's/ .*//'` @@ -5252,7 +5436,7 @@ fi motif_requires_xpm=no if test "$have_motif" = yes ; then echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6 -echo "configure:5267: checking whether Motif requires XPM" >&5 +echo "configure:5451: checking whether Motif requires XPM" >&5 if test "$motif_version" -ge 2000; then motif_requires_xpm=yes echo "$ac_t""maybe" 1>&6 @@ -5287,7 +5471,7 @@ if test "$have_motif" = yes ; then LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6 -echo "configure:5302: checking for XpQueryExtension in -lXp" >&5 +echo "configure:5486: checking for XpQueryExtension in -lXp" >&5 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5295,7 +5479,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXp -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5353,7 +5537,7 @@ if test "$have_motif" = yes ; then LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6 -echo "configure:5368: checking for _Xsetlocale in -lXintl" >&5 +echo "configure:5552: checking for _Xsetlocale in -lXintl" >&5 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5361,7 +5545,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXintl -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5421,7 +5605,7 @@ fi /*) echo $ac_n "checking for XPM headers""... $ac_c" 1>&6 -echo "configure:5436: checking for XPM headers" >&5 +echo "configure:5620: checking for XPM headers" >&5 d=$with_xpm/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -5431,7 +5615,7 @@ echo "configure:5436: checking for XPM headers" >&5 fi echo $ac_n "checking for XPM libs""... $ac_c" 1>&6 -echo "configure:5446: checking for XPM libs" >&5 +echo "configure:5630: checking for XPM libs" >&5 d=$with_xpm/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -5469,17 +5653,17 @@ if test "$with_xpm" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6 -echo "configure:5484: checking for X11/xpm.h" >&5 +echo "configure:5668: checking for X11/xpm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5542,7 +5726,7 @@ fi /*) echo $ac_n "checking for GL headers""... $ac_c" 1>&6 -echo "configure:5557: checking for GL headers" >&5 +echo "configure:5741: checking for GL headers" >&5 d=$with_gl/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -5552,7 +5736,7 @@ echo "configure:5557: checking for GL headers" >&5 fi echo $ac_n "checking for GL libs""... $ac_c" 1>&6 -echo "configure:5567: checking for GL libs" >&5 +echo "configure:5751: checking for GL libs" >&5 d=$with_gl/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -5593,17 +5777,17 @@ if test "$with_gl" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 -echo "configure:5608: checking for GL/gl.h" >&5 +echo "configure:5792: checking for GL/gl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5634,17 +5818,17 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6 -echo "configure:5649: checking for GL/glx.h" >&5 +echo "configure:5833: checking for GL/glx.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5681,7 +5865,7 @@ EOF # to link against. # echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6 -echo "configure:5696: checking whether GL is really MesaGL" >&5 +echo "configure:5880: checking whether GL is really MesaGL" >&5 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5693,7 +5877,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < EOF @@ -5734,12 +5918,12 @@ EOF unset ac_cv_mesagl_version_string echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6 -echo "configure:5749: checking MesaGL version number" >&5 +echo "configure:5933: checking MesaGL version number" >&5 if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION @@ -5792,7 +5976,7 @@ fi if test "$ac_have_mesa_gl" = yes; then echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5807: checking for pthread_create in -lpthread" >&5 +echo "configure:5991: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5800,7 +5984,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5849,7 +6033,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for gl_get_thread_context in -l$gl_lib_1""... $ac_c" 1>&6 -echo "configure:5864: checking for gl_get_thread_context in -l$gl_lib_1" >&5 +echo "configure:6048: checking for gl_get_thread_context in -l$gl_lib_1" >&5 ac_lib_var=`echo $gl_lib_1'_'gl_get_thread_context | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5857,7 +6041,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$gl_lib_1 $GL_LIBS -lpthread -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5916,7 +6100,7 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6 -echo "configure:5931: checking for glBindTexture in -l$gl_lib_1" >&5 +echo "configure:6115: checking for glBindTexture in -l$gl_lib_1" >&5 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5924,7 +6108,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5961,6 +6145,31 @@ fi CPPFLAGS="$ac_save_CPPFLAGS" LDFLAGS="$ac_save_LDFLAGS" + + # Check whether the `xscreensaver' executable should link against GL. + # See comments in utils/visual-gl.c for why this is sometimes necessary. + # + echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6 +echo "configure:6165: checking whether drastic GL measures must be taken" >&5 + case "$host" in + *-sgi*) + echo "$ac_t""yes -- hello, SGI." 1>&6 + cat >> confdefs.h <<\EOF +#define DAEMON_USE_GL 1 +EOF + + SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c' + SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o' + SAVER_GL_LIBS="$GL_LIBS" + ;; + *) + echo "$ac_t""no -- non-SGI." 1>&6 + SAVER_GL_SRCS='' + SAVER_GL_OBJS='' + SAVER_GL_LIBS='' + ;; + esac + fi elif test "$with_gl" != no; then @@ -5989,7 +6198,7 @@ fi /*) echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6 -echo "configure:6004: checking for XReadDisplay headers" >&5 +echo "configure:6213: checking for XReadDisplay headers" >&5 d=$with_readdisplay/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -5999,7 +6208,7 @@ echo "configure:6004: checking for XReadDisplay headers" >&5 fi echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6 -echo "configure:6014: checking for XReadDisplay libs" >&5 +echo "configure:6223: checking for XReadDisplay libs" >&5 d=$with_readdisplay/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -6037,17 +6246,17 @@ if test "$with_readdisplay" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6 -echo "configure:6052: checking for X11/extensions/readdisplay.h" >&5 +echo "configure:6261: checking for X11/extensions/readdisplay.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6098,7 +6307,7 @@ fi /*) echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6 -echo "configure:6113: checking for Iris Video headers" >&5 +echo "configure:6322: checking for Iris Video headers" >&5 d=$with_sgivideo/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -6108,7 +6317,7 @@ echo "configure:6113: checking for Iris Video headers" >&5 fi echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6 -echo "configure:6123: checking for Iris Video libs" >&5 +echo "configure:6332: checking for Iris Video libs" >&5 d=$with_sgivideo/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -6146,17 +6355,17 @@ if test "$with_sgivideo" = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6 -echo "configure:6161: checking for dmedia/vl.h" >&5 +echo "configure:6370: checking for dmedia/vl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6181,7 +6390,7 @@ fi if test "$have_sgivideo" = yes; then have_sgivideo=no echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6 -echo "configure:6196: checking for vlOpenVideo in -lvl" >&5 +echo "configure:6405: checking for vlOpenVideo in -lvl" >&5 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6189,7 +6398,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lvl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6268,7 +6477,7 @@ if test -n "$with_zippy_req" ; then case "$with_zippy_req" in /*) echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6 -echo "configure:6283: checking for $with_zippy_req" >&5 +echo "configure:6492: checking for $with_zippy_req" >&5 if test -x "$with_zippy_req" ; then echo "$ac_t""yes" 1>&6 else @@ -6282,7 +6491,7 @@ echo "configure:6283: checking for $with_zippy_req" >&5 # Extract the first word of "$with_zippy_req", so it can be a program name with args. set dummy $with_zippy_req; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6297: checking for $ac_word" >&5 +echo "configure:6506: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6332,7 +6541,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6347: checking for $ac_word" >&5 +echo "configure:6556: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6366,7 +6575,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6381: checking for $ac_word" >&5 +echo "configure:6590: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6401,7 +6610,7 @@ done if test -n "$emacs_exe" ; then echo $ac_n "checking for emacs yow""... $ac_c" 1>&6 -echo "configure:6416: checking for emacs yow" >&5 +echo "configure:6625: checking for emacs yow" >&5 # # get emacs to tell us where the libexec directory is. # @@ -6423,7 +6632,7 @@ echo "configure:6416: checking for emacs yow" >&5 if test -z "$ac_cv_zippy_program" ; then echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6 -echo "configure:6438: checking for xemacs yow" >&5 +echo "configure:6647: checking for xemacs yow" >&5 if test -n "$xemacs_exe" ; then # # get xemacs to tell us where the libexec directory is. @@ -6482,7 +6691,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6497: checking for $ac_word" >&5 +echo "configure:6706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6518,7 +6727,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6533: checking for $ac_word" >&5 +echo "configure:6742: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6617,12 +6826,12 @@ fi if test "$enable_vt_locking" = yes; then echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6 -echo "configure:6632: checking for the VT_LOCKSWITCH ioctl" >&5 +echo "configure:6841: checking for the VT_LOCKSWITCH ioctl" >&5 if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6631,7 +6840,7 @@ int main() { int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH; ; return 0; } EOF -if { (eval echo configure:6646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_vt_lockswitch=yes else @@ -6685,7 +6894,7 @@ fi /*) echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6 -echo "configure:6700: checking for Kerberos headers" >&5 +echo "configure:6909: checking for Kerberos headers" >&5 d=$with_kerberos/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -6695,7 +6904,7 @@ echo "configure:6700: checking for Kerberos headers" >&5 fi echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6 -echo "configure:6710: checking for Kerberos libs" >&5 +echo "configure:6919: checking for Kerberos libs" >&5 d=$with_kerberos/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -6726,7 +6935,7 @@ echo "configure:6710: checking for Kerberos libs" >&5 if test "$with_kerberos" = yes; then echo $ac_n "checking for Kerberos""... $ac_c" 1>&6 -echo "configure:6741: checking for Kerberos" >&5 +echo "configure:6950: checking for Kerberos" >&5 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6737,14 +6946,14 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < int main() { ; return 0; } EOF -if { (eval echo configure:6759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_kerberos=yes else @@ -6768,12 +6977,12 @@ EOF # from Tim Showalter PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes" echo $ac_n "checking for res_search""... $ac_c" 1>&6 -echo "configure:6783: checking for res_search" >&5 +echo "configure:6992: checking for res_search" >&5 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_res_search=yes" else @@ -6814,7 +7023,7 @@ if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 -echo "configure:6829: checking for res_search in -lresolv" >&5 +echo "configure:7038: checking for res_search in -lresolv" >&5 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6822,7 +7031,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6870,11 +7079,9 @@ if test "${with_pam+set}" = set; then withval="$with_pam" with_pam="$withval"; with_pam_req="$withval" else - with_pam=no + with_pam=yes fi -#### Leave PAM off by default for now, since it's buggy on Solaris -#### (and probably Linux, but it's so hard to tell...) case "$with_pam" in @@ -6883,7 +7090,7 @@ fi /*) echo $ac_n "checking for PAM headers""... $ac_c" 1>&6 -echo "configure:6898: checking for PAM headers" >&5 +echo "configure:7105: checking for PAM headers" >&5 d=$with_pam/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -6893,7 +7100,7 @@ echo "configure:6898: checking for PAM headers" >&5 fi echo $ac_n "checking for PAM libs""... $ac_c" 1>&6 -echo "configure:6908: checking for PAM libs" >&5 +echo "configure:7115: checking for PAM libs" >&5 d=$with_pam/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -6924,7 +7131,7 @@ echo "configure:6908: checking for PAM libs" >&5 if test "$with_pam" = yes; then echo $ac_n "checking for PAM""... $ac_c" 1>&6 -echo "configure:6939: checking for PAM" >&5 +echo "configure:7146: checking for PAM" >&5 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6935,14 +7142,14 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < int main() { ; return 0; } EOF -if { (eval echo configure:6957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_pam=yes else @@ -6963,6 +7170,69 @@ echo "$ac_t""$ac_cv_pam" 1>&6 EOF PASSWD_LIBS="${PASSWD_LIBS} -lpam -ldl" + + + echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6 +echo "configure:7188: checking how to call pam_strerror" >&5 + if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include + #include +int main() { +pam_handle_t *pamh = 0; + char *s = pam_strerror(pamh, PAM_SUCCESS); +; return 0; } +EOF +if { (eval echo configure:7203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_pam_strerror_args=2 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < + #include + #include +int main() { +char *s = + pam_strerror(PAM_SUCCESS); +; return 0; } +EOF +if { (eval echo configure:7221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_pam_strerror_args=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_pam_strerror_args=0 +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_pam_strerror_args=$ac_pam_strerror_args +fi + + ac_pam_strerror_args=$ac_cv_pam_strerror_args + if test "$ac_pam_strerror_args" = 1 ; then + echo "$ac_t""one argument" 1>&6 + elif test "$ac_pam_strerror_args" = 2 ; then + cat >> confdefs.h <<\EOF +#define PAM_STRERROR_TWO_ARGS 1 +EOF + + echo "$ac_t""two arguments" 1>&6 + else + echo "$ac_t""unknown" 1>&6 + fi fi elif test "$with_pam" != no; then echo "error: must be yes or no: --with-pam=$with_pam" @@ -6988,7 +7258,7 @@ fi /*) echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6 -echo "configure:7003: checking for shadow password headers" >&5 +echo "configure:7273: checking for shadow password headers" >&5 d=$with_shadow/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" @@ -6998,7 +7268,7 @@ echo "configure:7003: checking for shadow password headers" >&5 fi echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6 -echo "configure:7013: checking for shadow password libs" >&5 +echo "configure:7283: checking for shadow password libs" >&5 d=$with_shadow/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" @@ -7039,7 +7309,7 @@ echo "configure:7013: checking for shadow password libs" >&5 # if test "$pwent_cruft_done" = no ; then echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6 -echo "configure:7054: checking for Sun-style shadow passwords" >&5 +echo "configure:7324: checking for Sun-style shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7050,7 +7320,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -7063,7 +7333,7 @@ struct passwd_adjunct *p = getpwanam("nobody"); const char *pw = p->pwa_passwd; ; return 0; } EOF -if { (eval echo configure:7078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sun_adjunct=yes else @@ -7092,7 +7362,7 @@ EOF # if test "$pwent_cruft_done" = no ; then echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6 -echo "configure:7107: checking for DEC-style shadow passwords" >&5 +echo "configure:7377: checking for DEC-style shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7103,7 +7373,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -7120,7 +7390,7 @@ struct pr_passwd *p; pw = p->ufld.fd_encrypt; ; return 0; } EOF -if { (eval echo configure:7135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_enhanced_passwd=yes else @@ -7146,7 +7416,7 @@ EOF # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx) # (I'm told it needs -lcurses too, but I don't understand why.) echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6 -echo "configure:7161: checking for getprpwnam in -lprot" >&5 +echo "configure:7431: checking for getprpwnam in -lprot" >&5 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7154,7 +7424,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lprot -lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7185,7 +7455,7 @@ else echo "$ac_t""no" 1>&6 # On DEC, getprpwnam() is in -lsecurity echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7200: checking for getprpwnam in -lsecurity" >&5 +echo "configure:7470: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7193,7 +7463,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7233,7 +7503,7 @@ fi # if test "$pwent_cruft_done" = no ; then echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6 -echo "configure:7248: checking for HP-style shadow passwords" >&5 +echo "configure:7518: checking for HP-style shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7244,7 +7514,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -7257,7 +7527,7 @@ struct s_passwd *p = getspwnam("nobody"); const char *pw = p->pw_passwd; ; return 0; } EOF -if { (eval echo configure:7272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_hpux_passwd=yes else @@ -7282,7 +7552,7 @@ EOF # on HPUX, bigcrypt is in -lsec echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:7297: checking for bigcrypt in -lsec" >&5 +echo "configure:7567: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7290,7 +7560,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7328,7 +7598,7 @@ fi # if test "$pwent_cruft_done" = no ; then echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6 -echo "configure:7343: checking for generic shadow passwords" >&5 +echo "configure:7613: checking for generic shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7339,7 +7609,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -7351,7 +7621,7 @@ struct spwd *p = getspnam("nobody"); const char *pw = p->sp_pwdp; ; return 0; } EOF -if { (eval echo configure:7366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_shadow=yes else @@ -7377,7 +7647,7 @@ EOF # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc. have_getspnam=no echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6 -echo "configure:7392: checking for getspnam in -lc" >&5 +echo "configure:7662: checking for getspnam in -lc" >&5 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7385,7 +7655,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7418,7 +7688,7 @@ fi if test "$have_getspnam" = no ; then echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7433: checking for getspnam in -lgen" >&5 +echo "configure:7703: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7426,7 +7696,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7468,7 +7738,7 @@ fi # if test "$pwent_cruft_done" = no ; then echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6 -echo "configure:7483: checking for FreeBSD-style shadow passwords" >&5 +echo "configure:7753: checking for FreeBSD-style shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7489,7 +7759,7 @@ echo "$ac_t""$ac_cv_master_passwd" 1>&6 # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc. have_crypt=no echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6 -echo "configure:7504: checking for crypt in -lc" >&5 +echo "configure:7774: checking for crypt in -lc" >&5 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7497,7 +7767,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7530,7 +7800,7 @@ fi if test "$have_crypt" = no ; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:7545: checking for crypt in -lcrypt" >&5 +echo "configure:7815: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7538,7 +7808,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7587,6 +7857,138 @@ fi fi +# for the "sonar" hack -- check how to ping. +# +echo $ac_n "checking for struct icmp""... $ac_c" 1>&6 +echo "configure:7875: checking for struct icmp" >&5 +if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +int main() { +struct icmp i; + struct sockaddr s; + struct sockaddr_in si; + struct ip ip; + i.icmp_type = ICMP_ECHO; + i.icmp_code = 0; + i.icmp_cksum = 0; + i.icmp_id = 0; + i.icmp_seq = 0; + si.sin_family = AF_INET; + ip.ip_hl = 0; +; return 0; } +EOF +if { (eval echo configure:7915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_icmp=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_icmp=no +fi +rm -f conftest* +fi + +ac_have_icmp=$ac_cv_have_icmp +echo "$ac_t""$ac_cv_have_icmp" 1>&6 + +echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6 +echo "configure:7931: checking for struct icmphdr" >&5 +if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +int main() { +struct icmphdr i; + struct sockaddr s; + struct sockaddr_in si; + struct ip ip; + i.type = ICMP_ECHO; + i.code = 0; + i.cksum = 0; + i.un.echo.id = 0; + i.un.echo.sequence = 0; + si.sin_family = AF_INET; + ip.ip_hl = 0; +; return 0; } +EOF +if { (eval echo configure:7971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_icmphdr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_icmphdr=no +fi +rm -f conftest* +fi + +ac_have_icmphdr=$ac_cv_have_icmphdr +echo "$ac_t""$ac_cv_have_icmphdr" 1>&6 + +if test "$ac_have_icmp" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_ICMP 1 +EOF + +fi +if test "$ac_have_icmphdr" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_ICMPHDR 1 +EOF + +fi + + + +########################## end of tests. + + if test \! -z "$includedir" ; then INCLUDES="-I$includedir" fi @@ -7655,9 +8057,10 @@ fi tab=' ' if test "$have_gl" = yes; then GL_EXES='$(GL_EXES)' - GL_KLUDGE=${tab} + GL_MEN='$(GL_MEN)' + GL_KLUDGE="${tab} " else - GL_KLUDGE=' -'${tab} + GL_KLUDGE=" -${tab} " fi @@ -7687,6 +8090,10 @@ fi + + + + @@ -7769,6 +8176,10 @@ if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then warn 'The DPMS extension was requested, but was not found.' fi +if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then + warn 'The XF86VMODE extension was requested, but was not found.' +fi + if test "$have_motif" = no -a "$have_athena" = no ; then warnL "Neither Motif nor Athena widgets seem to be available;" warn2 "the \`xscreensaver-demo' program requires one or the" @@ -8073,9 +8484,13 @@ s%@PASSWD_SRCS@%$PASSWD_SRCS%g s%@PASSWD_OBJS@%$PASSWD_OBJS%g s%@XMU_SRCS@%$XMU_SRCS%g s%@XMU_OBJS@%$XMU_OBJS%g +s%@SAVER_GL_SRCS@%$SAVER_GL_SRCS%g +s%@SAVER_GL_OBJS@%$SAVER_GL_OBJS%g +s%@SAVER_GL_LIBS@%$SAVER_GL_LIBS%g s%@LOCK_SRCS@%$LOCK_SRCS%g s%@LOCK_OBJS@%$LOCK_OBJS%g s%@GL_EXES@%$GL_EXES%g +s%@GL_MEN@%$GL_MEN%g s%@GL_KLUDGE@%$GL_KLUDGE%g s%@HACKDIR@%$HACKDIR%g s%@APPDEFAULTS@%$APPDEFAULTS%g diff --git a/configure.in b/configure.in index 75a8fe32..3de83e09 100644 --- a/configure.in +++ b/configure.in @@ -874,6 +874,43 @@ elif test "$with_dpms" != no; then fi +# Check for the XF86VMODE server extension header. +# +have_xf86vmode=no +with_xf86vmode_req=unspecified +AC_ARG_WITH(xf86vmode-ext, +[ --with-xf86vmode-ext Include support for XFree86 virtual screens, if + possible (this is the default). + --without-xf86vmode-ext Do not compile in support for this extension.], + [with_xf86vmode="$withval"; with_xf86vmode_req="$withval"], + [with_xf86vmode=yes]) + +HANDLE_X_PATH_ARG(with_xf86vmode, --with-xf86vmode-ext, xf86vmode) + +if test "$with_xf86vmode" = yes; then + + # first check for xf86vmode.h + AC_CHECK_X_HEADER(X11/extensions/xf86vmode.h, [have_xf86vmode=yes]) + + # if that succeeded, then check for the -lXxf86vm + if test "$have_xf86vmode" = yes; then + have_xf86vmode=no + AC_CHECK_X_LIB(Xxf86vm, XF86VidModeGetViewPort, + [have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"], [], + -lXext -lX11) + fi + + # if that succeeded, then we've really got it. + if test "$have_xf86vmode" = yes; then + AC_DEFINE(HAVE_XF86VMODE) + fi + +elif test "$with_xf86vmode" != no; then + echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode" + exit 1 +fi + + # Check for /proc/interrupts # have_proc_interrupts=no @@ -1329,6 +1366,27 @@ EOF AC_CHECK_X_LIB($gl_lib_1, glBindTexture, [AC_DEFINE(HAVE_GLBINDTEXTURE)], [], $GL_LIBS -lX11 -lXext -lm) + + # Check whether the `xscreensaver' executable should link against GL. + # See comments in utils/visual-gl.c for why this is sometimes necessary. + # + AC_MSG_CHECKING(whether drastic GL measures must be taken) + case "$host" in + *-sgi*) + AC_MSG_RESULT([yes -- hello, SGI.]) + AC_DEFINE(DAEMON_USE_GL) + SAVER_GL_SRCS='$(UTILS_SRC)/visual-gl.c' + SAVER_GL_OBJS='$(UTILS_BIN)/visual-gl.o' + SAVER_GL_LIBS="$GL_LIBS" + ;; + *) + AC_MSG_RESULT([no -- non-SGI.]) + SAVER_GL_SRCS='' + SAVER_GL_OBJS='' + SAVER_GL_LIBS='' + ;; + esac + fi elif test "$with_gl" != no; then @@ -1654,9 +1712,7 @@ if test "$enable_locking" = yes; then [ --with-pam Include support for PAM (Pluggable Authentication Modules) if possible (this is the default.) --without-pam Do not compile in support for PAM.], - [with_pam="$withval"; with_pam_req="$withval"],[with_pam=no]) -#### Leave PAM off by default for now, since it's buggy on Solaris -#### (and probably Linux, but it's so hard to tell...) + [with_pam="$withval"; with_pam_req="$withval"],[with_pam=yes]) HANDLE_X_PATH_ARG(with_pam, --with-pam, PAM) @@ -1669,6 +1725,33 @@ if test "$enable_locking" = yes; then have_pam=yes AC_DEFINE(HAVE_PAM) PASSWD_LIBS="${PASSWD_LIBS} -lpam -ldl" + + + AC_MSG_CHECKING(how to call pam_strerror) + AC_CACHE_VAL(ac_cv_pam_strerror_args, + [AC_TRY_COMPILE([#include + #include + #include ], + [pam_handle_t *pamh = 0; + char *s = pam_strerror(pamh, PAM_SUCCESS);], + [ac_pam_strerror_args=2], + [AC_TRY_COMPILE([#include + #include + #include ], + [char *s = + pam_strerror(PAM_SUCCESS);], + [ac_pam_strerror_args=1], + [ac_pam_strerror_args=0])]) + ac_cv_pam_strerror_args=$ac_pam_strerror_args]) + ac_pam_strerror_args=$ac_cv_pam_strerror_args + if test "$ac_pam_strerror_args" = 1 ; then + AC_MSG_RESULT(one argument) + elif test "$ac_pam_strerror_args" = 2 ; then + AC_DEFINE(PAM_STRERROR_TWO_ARGS) + AC_MSG_RESULT(two arguments) + else + AC_MSG_RESULT(unknown) + fi fi elif test "$with_pam" != no; then echo "error: must be yes or no: --with-pam=$with_pam" @@ -1849,6 +1932,94 @@ if test "$enable_locking" = yes; then fi +# for the "sonar" hack -- check how to ping. +# +AC_MSG_CHECKING(for struct icmp) +AC_CACHE_VAL(ac_cv_have_icmp, + [AC_TRY_COMPILE([#include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include ], + [struct icmp i; + struct sockaddr s; + struct sockaddr_in si; + struct ip ip; + i.icmp_type = ICMP_ECHO; + i.icmp_code = 0; + i.icmp_cksum = 0; + i.icmp_id = 0; + i.icmp_seq = 0; + si.sin_family = AF_INET; + ip.ip_hl = 0;], + [ac_cv_have_icmp=yes], + [ac_cv_have_icmp=no])]) +ac_have_icmp=$ac_cv_have_icmp +AC_MSG_RESULT($ac_cv_have_icmp) + +AC_MSG_CHECKING(for struct icmphdr) +AC_CACHE_VAL(ac_cv_have_icmphdr, + [AC_TRY_COMPILE([#include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include ], + [struct icmphdr i; + struct sockaddr s; + struct sockaddr_in si; + struct ip ip; + i.type = ICMP_ECHO; + i.code = 0; + i.cksum = 0; + i.un.echo.id = 0; + i.un.echo.sequence = 0; + si.sin_family = AF_INET; + ip.ip_hl = 0;], + [ac_cv_have_icmphdr=yes], + [ac_cv_have_icmphdr=no])]) +ac_have_icmphdr=$ac_cv_have_icmphdr +AC_MSG_RESULT($ac_cv_have_icmphdr) + +if test "$ac_have_icmp" = yes ; then + AC_DEFINE(HAVE_ICMP) +fi +if test "$ac_have_icmphdr" = yes ; then + AC_DEFINE(HAVE_ICMPHDR) +fi + + + +########################## end of tests. + + if test \! -z "$includedir" ; then INCLUDES="-I$includedir" fi @@ -1911,9 +2082,10 @@ fi tab=' ' if test "$have_gl" = yes; then GL_EXES='$(GL_EXES)' - GL_KLUDGE=${tab} + GL_MEN='$(GL_MEN)' + GL_KLUDGE="${tab} " else - GL_KLUDGE=' -'${tab} + GL_KLUDGE=" -${tab} " fi AC_SUBST(INCLUDES) @@ -1937,9 +2109,13 @@ AC_SUBST(PASSWD_SRCS) AC_SUBST(PASSWD_OBJS) AC_SUBST(XMU_SRCS) AC_SUBST(XMU_OBJS) +AC_SUBST(SAVER_GL_SRCS) +AC_SUBST(SAVER_GL_OBJS) +AC_SUBST(SAVER_GL_LIBS) AC_SUBST(LOCK_SRCS) AC_SUBST(LOCK_OBJS) AC_SUBST(GL_EXES) +AC_SUBST(GL_MEN) AC_SUBST(GL_KLUDGE) AC_SUBST(HACKDIR) AC_SUBST(APPDEFAULTS) @@ -2025,6 +2201,10 @@ if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then warn 'The DPMS extension was requested, but was not found.' fi +if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then + warn 'The XF86VMODE extension was requested, but was not found.' +fi + if test "$have_motif" = no -a "$have_athena" = no ; then warnL "Neither Motif nor Athena widgets seem to be available;" warn2 "the \`xscreensaver-demo' program requires one or the" diff --git a/driver/Makefile.in b/driver/Makefile.in index 0187e217..68a676fb 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -94,6 +94,13 @@ PASSWD_LIBS = @PASSWD_LIBS@ LOCK_SRCS = @LOCK_SRCS@ LOCK_OBJS = @LOCK_OBJS@ +XMU_SRCS = @XMU_SRCS@ +XMU_OBJS = @XMU_OBJS@ + +GL_SRCS = @SAVER_GL_SRCS@ +GL_OBJS = @SAVER_GL_OBJS@ +GL_LIBS = @SAVER_GL_LIBS@ + DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \ $(UTILS_SRC)/visual.c DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \ @@ -114,9 +121,9 @@ SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o \ xset.o splash.o setuid.o stderr.o SAVER_SRCS = $(SAVER_SRCS_1) prefs.c $(LOCK_SRCS) \ - $(SAVER_UTIL_SRCS) @XMU_SRCS@ + $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS) SAVER_OBJS = $(SAVER_OBJS_1) prefs.o $(LOCK_OBJS) \ - $(SAVER_UTIL_OBJS) @XMU_OBJS@ + $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS) CMD_SRCS = remote.c xscreensaver-command.c CMD_OBJS = remote.o xscreensaver-command.o @@ -129,7 +136,7 @@ DEMO_SRCS = $(DEMO_SRCS_1) remote.c \ DEMO_OBJS = $(DEMO_OBJS_1) remote.o \ $(TOOLKIT_OBJS) $(DEMO_UTIL_OBJS) -SAVER_LIBS = $(LIBS) $(X_LIBS) @SAVER_LIBS@ \ +SAVER_LIBS = $(LIBS) $(X_LIBS) @SAVER_LIBS@ $(GL_LIBS) \ $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS) \ $(PASSWD_LIBS) diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index cc35ca4a..b8207387 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 3.10 -! 27-Apr-99 +! version 3.12 +! 10-May-99 ! ! See "man xscreensaver" for more info. The latest version is always ! available at http://www.jwz.org/xscreensaver/ @@ -32,6 +32,7 @@ *fadeTicks: 20 *splash: True *splashDuration: 5 +*visualID: default *captureStderr: True *overlayTextForeground: #FFFF00 @@ -89,15 +90,19 @@ ! colormaps, but others prefer 24-bit windows, that also can be arranged ! (in this case, by using "PseudoColor:" versus "TrueColor:".) ! +! Some of the screenhacks are written using OpenGL. OpenGL programs are +! a bit different than normal X programs, in that they prefer visuals that +! are *half* as deep as the screen. You can tell xscreensaver to select a +! good visual for a GL program by using the magic visual name "GL". +! ! All programs must be launched in such a way that they draw on the root ! window; they should not be spawned in the background with "&". If shell ! metacharacters are used, they must be understandable to `sh', not `csh' ! (the $SHELL variable is not consulted, for unfortunate but good reasons.) ! -! Be sure to check out Demo Mode: run the command `xscreensaver-command -demo' -! and it will cause the running XScreenSaver program to pop up a dialog box -! that lets you try out the following programs interactively. See the man -! pages for details. +! Be sure to check out Demo Mode: run the `xscreensaver-demo' program to +! edit the current list of programs interactively, try out the various modes, +! and change other parameters. See the man page for details. ! *programs: qix -root -solid -delay 0 -segments 100 \n\ attraction -root -mode balls \n\ @@ -206,45 +211,24 @@ PseudoColor: qix -root -count 5 -solid -transparent -linear \ -segments 250 -size 100 \n\ \ -@GL_KLUDGE@ gears -root \n\ -@GL_KLUDGE@ superquadrics -root \n\ -@GL_KLUDGE@ morph3d -root \n\ -@GL_KLUDGE@ cage -root \n\ -@GL_KLUDGE@ moebius -root \n\ -@GL_KLUDGE@ stairs -root \n\ -@GL_KLUDGE@ pipes -root \n\ -@GL_KLUDGE@ sproingies -root \n\ -@GL_KLUDGE@ rubik -root \n\ -@GL_KLUDGE@ atlantis -root \n\ -@GL_KLUDGE@ lament -root \n\ -@GL_KLUDGE@ bubble3d -root \n\ -@GL_KLUDGE@ glplanet -root \n\ -@GL_KLUDGE@ pulsar -root \n +@GL_KLUDGE@ GL: gears -root \n\ +@GL_KLUDGE@ GL: superquadrics -root \n\ +@GL_KLUDGE@ GL: morph3d -root \n\ +@GL_KLUDGE@ GL: cage -root \n\ +@GL_KLUDGE@ GL: moebius -root \n\ +@GL_KLUDGE@ GL: stairs -root \n\ +@GL_KLUDGE@ GL: pipes -root \n\ +@GL_KLUDGE@ GL: sproingies -root \n\ +@GL_KLUDGE@ GL: rubik -root \n\ +@GL_KLUDGE@ GL: atlantis -root \n\ +@GL_KLUDGE@ GL: lament -root \n\ +@GL_KLUDGE@ GL: bubble3d -root \n\ +@GL_KLUDGE@ GL: glplanet -root \n\ +@GL_KLUDGE@ GL: pulsar -root \n\ + - GL: pulsar -root -texture -mipmap -texture_quality \ + -light -fog \n -! A few of the hacks require OpenGL, and will only be built if you have it. -! If your vendor doesn't provide real OpenGL, you might want to consider -! building MesaGL, which is a free implementation -- GL is way cool. -! -! Note that those hacks (gears, superquadratics, morph3d, cage, moebius, -! stairs, pipes, sproingies, and rubik) tend to work best on a visual *half* -! as deep as the depth of the screen, since that way, they can do -! double-buffering -- try it and see, but you will probably find that you -! should specify the deepest visual that is half as deep as the screen. -! -! For example, on a screen that supports both 24-bit TrueColor and 12-bit -! PseudoColor, the 12-bit visual will probably work best (this is true of -! base-model SGI Indys: the 0x29 visual is the one you want.) Oddly, on SGI -! O2s, (machines that have serious hardware support for GL) the 12-bit -! PseudoColor visual looks awful (you get a black and white, flickery image.) -! On these machines, the visual you want turns out to be 0x31 -- this is but -! one of the eight 15-bit TrueColor visuals (yes, 8, and yes, 15) that O2s -! provide. This is the only visual that works properly -- as far as xdpyinfo -! is concerned, all of the 15-bit TrueColor visuals are identical, but some -! flicker like mad, and some have deeply weird artifacts (hidden surfaces -! show through!) I suppose these other visuals must be tied to some arcane -! hardware feature... Your mileage, therefore, may vary dramatically. -! ! Some other programs that you might want to track down (these work as ! XScreenSaver helpers, but are not distributed with it): ! diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h index 01787522..66a777b2 100644 --- a/driver/XScreenSaver_ad.h +++ b/driver/XScreenSaver_ad.h @@ -13,6 +13,7 @@ "*fadeTicks: 20", "*splash: True", "*splashDuration: 5", +"*visualID: default", "*captureStderr: True", "*overlayTextForeground: #FFFF00", "*overlayTextBackground: #000000", @@ -134,20 +135,22 @@ PseudoColor: qix -root -count 5 -solid -transparent -linear \ -segments 250 -size 100 \\n\ \ - gears -root \\n\ - superquadrics -root \\n\ - morph3d -root \\n\ - cage -root \\n\ - moebius -root \\n\ - stairs -root \\n\ - pipes -root \\n\ - sproingies -root \\n\ - rubik -root \\n\ - atlantis -root \\n\ - lament -root \\n\ - bubble3d -root \\n\ - glplanet -root \\n\ - pulsar -root \\n", + GL: gears -root \\n\ + GL: superquadrics -root \\n\ + GL: morph3d -root \\n\ + GL: cage -root \\n\ + GL: moebius -root \\n\ + GL: stairs -root \\n\ + GL: pipes -root \\n\ + GL: sproingies -root \\n\ + GL: rubik -root \\n\ + GL: atlantis -root \\n\ + GL: lament -root \\n\ + GL: bubble3d -root \\n\ + GL: glplanet -root \\n\ + GL: pulsar -root \\n\ + - GL: pulsar -root -texture -mipmap -texture_quality \ + -light -fog \\n", " ", "XScreenSaver.pointerPollTime: 5", "XScreenSaver.initialDelay: 0", diff --git a/driver/demo.c b/driver/demo.c index 76e8917d..10b246e8 100644 --- a/driver/demo.c +++ b/driver/demo.c @@ -1268,7 +1268,6 @@ main (int argc, char **argv) short_version [4] = 0; p->db = db; - p->fading_possible_p = True; load_init_file (p); *p2 = *p; diff --git a/driver/lock.c b/driver/lock.c index 8a00b3ba..4ca3d513 100644 --- a/driver/lock.c +++ b/driver/lock.c @@ -27,6 +27,10 @@ # include #endif /* HAVE_SYSLOG */ +#ifdef HAVE_XF86VMODE +# include +#endif /* HAVE_XF86VMODE */ + #ifdef _VROOT_H_ ERROR! You must not include vroot.h in this file. #endif @@ -103,8 +107,15 @@ struct passwd_dialog_data { Pixmap save_under; }; +static void draw_passwd_window (saver_info *si); +static void update_passwd_window (saver_info *si, const char *printed_passwd, + float ratio); +static void destroy_passwd_window (saver_info *si); +static void undo_vp_motion (saver_info *si); +static void set_vp_mode_switch_locked (saver_info *si, Bool locked_p); -void + +static void make_passwd_window (saver_info *si) { struct passwd *p = getpwuid (getuid ()); @@ -298,13 +309,13 @@ make_passwd_window (saver_info *si) attrmask |= CWEventMask; attrs.event_mask = ExposureMask|KeyPressMask; { - Dimension w = WidthOfScreen(screen); - Dimension h = HeightOfScreen(screen); + int x, y, w, h; + get_screen_viewport (si->default_screen, &x, &y, &w, &h, False); if (si->prefs.debug_p) w /= 2; - pw->x = ((w + pw->width) / 2) - pw->width; - pw->y = ((h + pw->height) / 2) - pw->height; - if (pw->x < 0) pw->x = 0; - if (pw->y < 0) pw->y = 0; + pw->x = x + ((w + pw->width) / 2) - pw->width; + pw->y = y + ((h + pw->height) / 2) - pw->height; + if (pw->x < x) pw->x = x; + if (pw->y < y) pw->y = y; } pw->border_width = get_integer_resource ("passwd.borderWidth", @@ -347,6 +358,10 @@ make_passwd_window (saver_info *si) XMapRaised (si->dpy, si->passwd_dialog); XSync (si->dpy, False); + move_mouse_grab (si, si->passwd_dialog, si->screens[0].cursor); + undo_vp_motion (si); + set_vp_mode_switch_locked (si, True); + si->pw_data = pw; draw_passwd_window (si); @@ -550,6 +565,7 @@ update_passwd_window (saver_info *si, const char *printed_passwd, float ratio) XGCValues gcv; GC gc1, gc2; int x, y; + XRectangle rects[1]; pw->ratio = ratio; gcv.foreground = pw->passwd_foreground; @@ -567,22 +583,34 @@ update_passwd_window (saver_info *si, const char *printed_passwd, float ratio) /* the "password" text field */ + rects[0].x = pw->passwd_field_x; + rects[0].y = pw->passwd_field_y; + rects[0].width = pw->passwd_field_width; + rects[0].height = pw->passwd_field_height; + XFillRectangle (si->dpy, si->passwd_dialog, gc2, - pw->passwd_field_x, pw->passwd_field_y, - pw->passwd_field_width, pw->passwd_field_height); + rects[0].x, rects[0].y, rects[0].width, rects[0].height); + + XSetClipRectangles (si->dpy, gc1, 0, 0, rects, 1, Unsorted); + XDrawString (si->dpy, si->passwd_dialog, gc1, - pw->passwd_field_x + pw->shadow_width, - pw->passwd_field_y + (pw->passwd_font->ascent + - pw->passwd_font->descent), - pw->passwd_string, strlen(pw->passwd_string)); + rects[0].x + pw->shadow_width, + rects[0].y + (pw->passwd_font->ascent + + pw->passwd_font->descent), + pw->passwd_string, strlen(pw->passwd_string)); + + XSetClipMask (si->dpy, gc1, None); /* The I-beam */ if (pw->i_beam != 0) { - x = (pw->passwd_field_x + pw->shadow_width + + x = (rects[0].x + pw->shadow_width + string_width (pw->passwd_font, pw->passwd_string)); - y = pw->passwd_field_y + pw->shadow_width; + y = rects[0].y + pw->shadow_width; + + if (x > rects[0].x + rects[0].width - 1) + x = rects[0].x + rects[0].width - 1; XDrawLine (si->dpy, si->passwd_dialog, gc1, x, y, x, y + pw->passwd_font->ascent); } @@ -626,6 +654,10 @@ destroy_passwd_window (saver_info *si) if (pw->timer) XtRemoveTimeOut (pw->timer); + move_mouse_grab (si, RootWindowOfScreen(si->screens[0].screen), + si->screens[0].cursor); + set_vp_mode_switch_locked (si, False); + if (si->passwd_dialog) { XDestroyWindow (si->dpy, si->passwd_dialog); @@ -683,6 +715,72 @@ destroy_passwd_window (saver_info *si) si->pw_data = 0; } +static void +undo_vp_motion (saver_info *si) +{ +#ifdef HAVE_XF86VMODE + saver_preferences *p = &si->prefs; + int screen = 0; /* always screen 0 */ + saver_screen_info *ssi = &si->screens[screen]; + int event, error, x, y; + Bool status; + + if (ssi->blank_vp_x == -1 && ssi->blank_vp_y == -1) + return; + if (!XF86VidModeQueryExtension (si->dpy, &event, &error)) + return; + if (!XF86VidModeGetViewPort (si->dpy, 0, &x, &y)) + return; + if (ssi->blank_vp_x == x && ssi->blank_vp_y == y) + return; + + /* We're going to move the viewport. The mouse has just been grabbed on + (and constrained to, thus warped to) the password window, so it is no + longer near the edge of the screen. However, wait a bit anyway, just + to make sure the server drains its last motion event, so that the + screen doesn't continue to scroll after we've reset the viewport. + */ + XSync (si->dpy, False); + usleep (250); /* 1/4 second */ + XSync (si->dpy, False); + + status = XF86VidModeSetViewPort (si->dpy, screen, + ssi->blank_vp_x, ssi->blank_vp_y); + + if (!status) + fprintf (stderr, "%s: unable to move vp from (%d,%d) back to (%d,%d)!\n", + blurb(), x, y, ssi->blank_vp_x, ssi->blank_vp_y); + else if (p->verbose_p) + fprintf (stderr, "%s: vp moved to (%d,%d); moved it back to (%d,%d).\n", + blurb(), x, y, ssi->blank_vp_x, ssi->blank_vp_y); + +#endif /* HAVE_XF86VMODE */ +} + + +static void +set_vp_mode_switch_locked (saver_info *si, Bool locked_p) +{ +#ifdef HAVE_XF86VMODE + saver_preferences *p = &si->prefs; + int screen = 0; /* always screen 0 */ + int event, error; + Bool status; + + if (!XF86VidModeQueryExtension (si->dpy, &event, &error)) + return; + status = XF86VidModeLockModeSwitch (si->dpy, screen, locked_p); + + if (!status) + fprintf (stderr, "%s: unable to %s vp switching!\n", + blurb(), (locked_p ? "lock" : "unlock")); + else if (p->verbose_p) + fprintf (stderr, "%s: %s vp switching.\n", + blurb(), (locked_p ? "locked" : "unlocked")); +#endif /* HAVE_XF86VMODE */ +} + + /* Interactions */ diff --git a/driver/passwd-pam.c b/driver/passwd-pam.c index e29ff9c7..0d14e262 100644 --- a/driver/passwd-pam.c +++ b/driver/passwd-pam.c @@ -10,6 +10,26 @@ * documentation. No representations are made about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. + * + * Some PAM resources: + * + * PAM home page: + * http://www.us.kernel.org/pub/linux/libs/pam/ + * + * PAM FAQ: + * http://www.us.kernel.org/pub/linux/libs/pam/FAQ + * + * PAM Application Developers' Guide: + * http://www.us.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_appl.html + * + * PAM Mailing list archives: + * http://www.linuxhq.com/lnxlists/linux-pam/ + * + * Compatibility notes, especially between Linux and Solaris: + * http://www.contrib.andrew.cmu.edu/u/shadow/pam.html + * + * The Open Group's PAM API documentation: + * http://www.opengroup.org/onlinepubs/8329799/pam_start.htm */ #ifdef HAVE_CONFIG_H @@ -63,9 +83,23 @@ struct pam_closure { /* We handle delays ourself.*/ /* Don't set this to 0 (Linux bug workaround.) */ # define PAM_NO_DELAY(pamh) pam_fail_delay ((pamh), 1) -# else /* !HAVE_PAM_FAIL_DELAY */ +#else /* !HAVE_PAM_FAIL_DELAY */ # define PAM_NO_DELAY(pamh) /* */ -# endif /* !HAVE_PAM_FAIL_DELAY */ +#endif /* !HAVE_PAM_FAIL_DELAY */ + + +/* On SunOS 5.6, and on Linux with PAM 0.64, pam_strerror() takes two args. + On some other Linux systems with some other version of PAM (e.g., + whichever Debian release comes with a 2.2.5 kernel) it takes one arg. + I can't tell which is more "recent" or "correct" behavior, so configure + figures out which is in use for us. Shoot me! + */ +#ifdef PAM_STRERROR_TWO_ARGS +# define PAM_STRERROR(pamh, status) pam_strerror((pamh), (status)) +#else /* !PAM_STRERROR_TWO_ARGS */ +# define PAM_STRERROR(pamh, status) pam_strerror((status)) +#endif /* !PAM_STRERROR_TWO_ARGS */ + /* PAM sucks in that there is no way to tell whether a particular service is configured at all. That is, there is no way to tell the difference @@ -113,6 +147,13 @@ struct pam_closure { */ +/* On SunOS 5.6, the `pam_conv.appdata_ptr' slot seems to be ignored, and + the `closure' argument to pc.conv always comes in as random garbage. + So we get around this by using a global variable instead. Shoot me! + */ +static void *suns_pam_implementation_blows = 0; + + /* This can be called at any time, and says whether the typed password belongs to either the logged in user (real uid, not effective); or to root. @@ -139,6 +180,10 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) pc.conv = &pam_conversation; pc.appdata_ptr = (void *) &c; + /* On SunOS 5.6, the `appdata_ptr' slot seems to be ignored, and the + `closure' argument to pc.conv always comes in as random garbage. */ + suns_pam_implementation_blows = (void *) &c; + /* Initialize PAM. */ @@ -146,7 +191,7 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) if (verbose_p) fprintf (stderr, "%s: pam_start (\"%s\", \"%s\", ...) ==> %d (%s)\n", blurb(), service, c.user, - status, pam_strerror (pamh, status)); + status, PAM_STRERROR (pamh, status)); if (status != PAM_SUCCESS) goto DONE; /* #### We should set PAM_TTY to the display we're using, but we @@ -159,7 +204,7 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) status = pam_set_item (pamh, PAM_TTY, strdup(tty)); if (verbose_p) fprintf (stderr, "%s: pam_set_item (p, PAM_TTY, \"%s\") ==> %d (%s)\n", - blurb(), tty, status, pam_strerror(pamh, status)); + blurb(), tty, status, PAM_STRERROR(pamh, status)); } /* Try to authenticate as the current user. @@ -168,7 +213,7 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) status = pam_authenticate (pamh, 0); if (verbose_p) fprintf (stderr, "%s: pam_authenticate (...) ==> %d (%s)\n", - blurb(), status, pam_strerror(pamh, status)); + blurb(), status, PAM_STRERROR(pamh, status)); if (status == PAM_SUCCESS) /* Win! */ goto DONE; @@ -178,14 +223,14 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) status = pam_set_item (pamh, PAM_USER, strdup(c.user)); if (verbose_p) fprintf (stderr, "%s: pam_set_item(p, PAM_USER, \"%s\") ==> %d (%s)\n", - blurb(), c.user, status, pam_strerror(pamh, status)); + blurb(), c.user, status, PAM_STRERROR(pamh, status)); if (status != PAM_SUCCESS) goto DONE; PAM_NO_DELAY(pamh); status = pam_authenticate (pamh, 0); if (verbose_p) fprintf (stderr, "%s: pam_authenticate (...) ==> %d (%s)\n", - blurb(), status, pam_strerror(pamh, status)); + blurb(), status, PAM_STRERROR(pamh, status)); DONE: if (user) free (user); @@ -203,22 +248,60 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) Bool -pam_lock_init (int argc, char **argv, Bool verbose_p) +pam_priv_init (int argc, char **argv, Bool verbose_p) { /* We have nothing to do at init-time. However, we might as well do some error checking. If "/etc/pam.d" exists and is a directory, but "/etc/pam.d/xlock" does not exist, warn that PAM probably isn't going to work. + + This is a priv-init instead of a non-priv init in case the directory + is unreadable or something (don't know if that actually happens.) */ - const char dir[] = "/etc/pam.d"; - const char file[] = "/etc/pam.d/" PAM_SERVICE_NAME; + const char dir[] = "/etc/pam.d"; + const char file[] = "/etc/pam.d/" PAM_SERVICE_NAME; + const char file2[] = "/etc/pam.conf"; struct stat st; + if (stat (dir, &st) == 0 && st.st_mode & S_IFDIR) - if (stat (file, &st) != 0) + { + if (stat (file, &st) != 0) + fprintf (stderr, + "%s: warning: %s does not exist.\n" + "%s: password authentication via PAM is unlikely to work.\n", + blurb(), file, blurb()); + } + else if (stat (file2, &st) == 0) + { + FILE *f = fopen (file2, "r"); + if (f) + { + Bool ok = False; + char buf[255]; + while (fgets (buf, sizeof(buf), f)) + if (strstr (buf, PAM_SERVICE_NAME)) + { + ok = True; + break; + } + fclose (f); + if (!ok) + { + fprintf (stderr, + "%s: warning: %s does not list the `%s' service.\n" + "%s: password authentication via PAM is unlikely to work.\n", + blurb(), file2, PAM_SERVICE_NAME, blurb()); + } + } + /* else warn about file2 existing but being unreadable? */ + } + else + { fprintf (stderr, - "%s: warning: %s does not exist.\n" + "%s: warning: neither %s nor %s exist.\n" "%s: password authentication via PAM is unlikely to work.\n", - blurb(), file, blurb()); + blurb(), file2, file, blurb()); + } /* Return true anyway, just in case. */ return True; @@ -249,6 +332,10 @@ pam_conversation (int nmsgs, struct pam_response *reply = 0; struct pam_closure *c = (struct pam_closure *) closure; + /* On SunOS 5.6, the `closure' argument always comes in as random garbage. */ + c = (struct pam_closure *) suns_pam_implementation_blows; + + reply = (struct pam_response *) calloc (nmsgs, sizeof (*reply)); if (!reply) return PAM_CONV_ERR; diff --git a/driver/passwd-pwent.c b/driver/passwd-pwent.c index 5bfaec9e..a2d5e0c8 100644 --- a/driver/passwd-pwent.c +++ b/driver/passwd-pwent.c @@ -195,9 +195,15 @@ get_encrypted_passwd(const char *user) *s = 0; } +#ifndef HAVE_PAM + /* We only issue this warning if not compiled with support for PAM. + If we're using PAM, it's not unheard of that normal pwent passwords + would be unavailable. */ + if (!result) fprintf (stderr, "%s: couldn't get password of \"%s\"\n", blurb(), (user ? user : "(null)")); +#endif /* !HAVE_PAM */ return result; } diff --git a/driver/passwd.c b/driver/passwd.c index 1847d1be..b55334c9 100644 --- a/driver/passwd.c +++ b/driver/passwd.c @@ -51,7 +51,7 @@ extern Bool kerberos_lock_init (int argc, char **argv, Bool verbose_p); extern Bool kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p); #endif #ifdef HAVE_PAM -extern Bool pam_lock_init (int argc, char **argv, Bool verbose_p); +extern Bool pam_priv_init (int argc, char **argv, Bool verbose_p); extern Bool pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p); #endif extern Bool pwent_lock_init (int argc, char **argv, Bool verbose_p); @@ -70,7 +70,7 @@ struct auth_methods methods[] = { False, False }, # endif # ifdef HAVE_PAM - { "PAM", pam_lock_init, 0, pam_passwd_valid_p, + { "PAM", 0, pam_priv_init, pam_passwd_valid_p, False, False }, # endif { "normal", pwent_lock_init, pwent_priv_init, pwent_passwd_valid_p, @@ -111,7 +111,11 @@ lock_init (int argc, char **argv, Bool verbose_p) if (!methods[i].priv_initted_p) /* Bail if lock_priv_init failed. */ continue; - methods[i].initted_p = methods[i].init (argc, argv, verbose_p); + if (!methods[i].init) + methods[i].initted_p = True; + else + methods[i].initted_p = methods[i].init (argc, argv, verbose_p); + if (methods[i].initted_p) any_ok = True; else if (verbose_p) @@ -136,7 +140,7 @@ passwd_valid_p (const char *typed_passwd, Bool verbose_p) an earlier authentication method fails and a later one succeeds, something screwy is probably going on.) */ - if (verbose_p) + if (verbose_p && i > 0) { for (j = 0; j < i; j++) if (methods[j].initted_p) diff --git a/driver/prefs.c b/driver/prefs.c index e1913142..cdf95796 100644 --- a/driver/prefs.c +++ b/driver/prefs.c @@ -808,15 +808,7 @@ load_init_file (saver_preferences *p) p->fade_p = False; if (! p->fade_p) p->unfade_p = False; - if (p->verbose_p && !p->fading_possible_p && (p->fade_p || p->unfade_p)) - { - fprintf (stderr, "%s: there are no PseudoColor or GrayScale visuals.\n", - blurb()); - fprintf (stderr, "%s: ignoring the request for fading/unfading.\n", - blurb()); - } - - p->watchdog_timeout = p->cycle; + 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 */ diff --git a/driver/prefs.h b/driver/prefs.h index 55ffef35..62c768d9 100644 --- a/driver/prefs.h +++ b/driver/prefs.h @@ -40,12 +40,6 @@ struct saver_preferences { Bool unfade_p; /* whether to fade from black, if possible */ int fade_seconds; /* how long that should take */ int fade_ticks; /* how many ticks should be used */ - Bool fading_possible_p; /* Whether fading to/from black is possible. - (This isn't strictly a preference, as it - can only be known by querying the display; - the caller of the prefs code may fill this - in if it knows/cares, and warnings will be - issued.) */ Bool install_cmap_p; /* whether we should use our own colormap when using the screen's default visual. */ diff --git a/driver/setuid.c b/driver/setuid.c index 1323565b..83ad494e 100644 --- a/driver/setuid.c +++ b/driver/setuid.c @@ -14,8 +14,6 @@ # include "config.h" #endif -#ifndef NO_SETUID /* whole file */ - #include /* not used for much... */ /* This file doesn't need the Xt headers, so stub these types out... */ @@ -35,7 +33,6 @@ #include /* for getpwnam() and struct passwd */ #include /* for getgrgid() and struct group */ - static const char * uid_gid_string (uid_t uid, gid_t gid) { @@ -310,10 +307,3 @@ hack_uid (saver_info *si) } } } - -#else /* !NO_SETUID */ - -void hack_uid (saver_info *si) { } -void describe_uids (saver_info *si, FILE *out) { } - -#endif /* NO_SETUID */ diff --git a/driver/splash.c b/driver/splash.c index 8f6fb011..fabd8824 100644 --- a/driver/splash.c +++ b/driver/splash.c @@ -343,13 +343,13 @@ make_splash_dialog (saver_info *si) attrs.event_mask = (ExposureMask | ButtonPressMask | ButtonReleaseMask); { - Dimension w = WidthOfScreen(screen); - Dimension h = HeightOfScreen(screen); + int sx, sy, w, h; + get_screen_viewport (si->default_screen, &sx, &sy, &w, &h, False); if (si->prefs.debug_p) w /= 2; - x = ((w + sp->width) / 2) - sp->width; - y = ((h + sp->height) / 2) - sp->height; - if (x < 0) x = 0; - if (y < 0) y = 0; + x = sx + (((w + sp->width) / 2) - sp->width); + y = sy + (((h + sp->height) / 2) - sp->height); + if (x < sx) x = sx; + if (y < sy) y = sy; } bw = get_integer_resource ("splash.borderWidth", "Dialog.BorderWidth"); diff --git a/driver/stderr.c b/driver/stderr.c index 4258f874..fafb1e58 100644 --- a/driver/stderr.c +++ b/driver/stderr.c @@ -163,15 +163,17 @@ print_stderr_1 (saver_screen_info *ssi, char *string) ssi->stderr_text_y = 0; #else int offset = ssi->stderr_line_height * 5; + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + XCopyArea (dpy, window, window, ssi->stderr_gc, 0, v_border + offset, - WidthOfScreen (screen), - (HeightOfScreen (screen) - v_border - v_border - - offset), + xgwa.width, + (xgwa.height - v_border - v_border - offset), 0, v_border); XClearArea (dpy, window, - 0, HeightOfScreen (screen) - v_border - offset, - WidthOfScreen (screen), offset, False); + 0, xgwa.height - v_border - offset, + xgwa.width, offset, False); ssi->stderr_text_y -= offset; #endif } @@ -202,7 +204,9 @@ make_stderr_overlay_window (saver_screen_info *ssi) { int depth = visual_depth (ssi->screen, visual); XSetWindowAttributes attrs; + XWindowAttributes xgwa; unsigned long attrmask; + XGetWindowAttributes (si->dpy, ssi->screensaver_window, &xgwa); if (si->prefs.debug_p) fprintf(real_stderr, @@ -224,7 +228,7 @@ make_stderr_overlay_window (saver_screen_info *ssi) ssi->stderr_overlay_window = XCreateWindow(si->dpy, ssi->screensaver_window, 0, 0, - WidthOfScreen(ssi->screen), HeightOfScreen(ssi->screen), + xgwa.width, xgwa.height, 0, depth, InputOutput, visual, attrmask, &attrs); XMapRaised(si->dpy, ssi->stderr_overlay_window); } diff --git a/driver/subprocs.c b/driver/subprocs.c index 8b6187d9..53dd884e 100644 --- a/driver/subprocs.c +++ b/driver/subprocs.c @@ -248,6 +248,17 @@ exec_screenhack (saver_info *si, const char *command) Bool hairy_p = !!strpbrk (command, "*?$&!<>[];`'\\\"="); /* note: = is in the above because of the sh syntax "FOO=bar cmd". */ + if (getuid() == (uid_t) 0 || geteuid() == (uid_t) 0) + { + /* If you're thinking of commenting this out, think again. + If you do so, you will open a security hole. Mail jwz + so that he may enlighten you as to the error of your ways. + */ + fprintf (stderr, "%s: we're still running as root! Disaster!\n", + blurb()); + saver_exit (si, 1, 0); + } + if (p->verbose_p) fprintf (stderr, "%s: spawning \"%s\" in pid %lu%s.\n", blurb(), command, (unsigned long) getpid (), diff --git a/driver/test-passwd.c b/driver/test-passwd.c index 9d358122..dfb7da25 100644 --- a/driver/test-passwd.c +++ b/driver/test-passwd.c @@ -22,6 +22,8 @@ #include #include +#include + #include #include #include @@ -44,11 +46,11 @@ void monitor_power_on (saver_info *si) {} Bool monitor_powered_on_p (saver_info *si) { return True; } void initialize_screensaver_window (saver_info *si) {} void raise_window (saver_info *si, Bool i, Bool b, Bool d) {} -void blank_screen (saver_info *si) {} +Bool blank_screen (saver_info *si) {return False;} void unblank_screen (saver_info *si) {} Bool select_visual (saver_screen_info *ssi, const char *v) { return False; } Bool window_exists_p (Display *dpy, Window window) {return True;} -void start_notice_events_timer (saver_info *si, Window w, Bool) {} +void start_notice_events_timer (saver_info *si, Window w, Bool b) {} Bool handle_clientmessage (saver_info *si, XEvent *e, Bool u) { return False; } int BadWindow_ehandler (Display *dpy, XErrorEvent *error) { exit(1); } const char *signal_name(int signal) { return "???"; } @@ -58,6 +60,18 @@ void saver_exit (saver_info *si, int status, const char *core) { exit(status);} const char *blurb(void) { return progname; } Atom XA_SCREENSAVER, XA_DEMO, XA_PREFS; +void +get_screen_viewport (saver_screen_info *ssi, + int *x_ret, int *y_ret, + int *w_ret, int *h_ret, + Bool verbose_p) +{ + *x_ret = 0; + *y_ret = 0; + *w_ret = WidthOfScreen (ssi->screen); + *h_ret = HeightOfScreen (ssi->screen); +} + void idle_timer (XtPointer closure, XtIntervalId *id) @@ -79,7 +93,7 @@ static char *fallback[] = { int main (int argc, char **argv) { - Widget toplevel_shell; + Widget toplevel_shell = 0; saver_screen_info ssip; saver_info sip; saver_info *si = &sip; @@ -99,22 +113,25 @@ main (int argc, char **argv) si->version = (char *) malloc (5); memcpy (si->version, screensaver_id + 17, 4); progname = argv[0]; - -# ifdef SCO - set_auth_parameters(argc, argv); -# endif /* SCO */ + { + char *s = strrchr(progname, '/'); + if (*s) strcpy (progname, s+1); + } /* before hack_uid() for proper permissions */ - if (! lock_init (argc, argv, True)) + lock_priv_init (argc, argv, True); + + hack_uid (si); + + if (! lock_init (argc, argv, si->prefs.verbose_p)) { si->locking_disabled_p = True; si->nolock_reason = "error getting password"; } - hack_uid (si); - progclass = "XScreenSaver"; +#if (WHICH != 2) toplevel_shell = XtAppInitialize (&si->app, progclass, 0, 0, &argc, argv, fallback, 0, 0); @@ -137,6 +154,10 @@ main (int argc, char **argv) load_init_file (&si->prefs); +#endif /* (WHICH != 2) */ + + p->verbose_p = True; + while (1) { #if WHICH == 0 @@ -163,6 +184,24 @@ main (int argc, char **argv) XSync (si->dpy, False); sleep (1); } +#elif WHICH == 2 + { + char *pass; + char buf[255]; + struct passwd *p = getpwuid (getuid ()); + printf ("\n%s: %s's password: ", progname, p->pw_name); + + pass = fgets (buf, sizeof(buf)-1, stdin); + if (!pass || !*pass) + exit (0); + if (pass[strlen(pass)-1] == '\n') + pass[strlen(pass)-1] = 0; + + if (passwd_valid_p (pass, True)) + printf ("%s: Ok!\n", progname); + else + printf ("%s: Wrong!\n", progname); + } #endif } } diff --git a/driver/timers.c b/driver/timers.c index 5f1bd418..ef5d5433 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -54,6 +54,8 @@ static Bool proc_interrupts_activity_p (saver_info *si); #endif /* HAVE_PROC_INTERRUPTS */ +static void check_for_clock_skew (saver_info *si); + void idle_timer (XtPointer closure, XtIntervalId *id) @@ -213,6 +215,16 @@ cycle_timer (XtPointer closure, XtIntervalId *id) saver_info *si = (saver_info *) closure; saver_preferences *p = &si->prefs; Time how_long = p->cycle; + + if (si->selection_mode > 0 && + screenhack_running_p (si)) + /* If we're in "SELECT n" mode, the cycle timer going off will just + restart this same hack again. There's not much point in doing this + every 5 or 10 minutes, but on the other hand, leaving one hack running + for days is probably not a great idea, since they tend to leak and/or + crash. So, restart the thing once an hour. */ + how_long = 1000 * 60 * 60; + if (si->dbox_up_p) { if (p->verbose_p) @@ -226,8 +238,18 @@ cycle_timer (XtPointer closure, XtIntervalId *id) if (p->verbose_p) fprintf (stderr, "%s: changing graphics hacks.\n", blurb()); kill_screenhack (si); - spawn_screenhack (si, False); + + if (!si->throttled_p) + spawn_screenhack (si, False); + else + { + raise_window (si, True, True, False); + if (p->verbose_p) + fprintf (stderr, "%s: not launching new hack (throttled.)\n", + blurb()); + } } + si->cycle_id = XtAppAddTimeOut (si->app, how_long, cycle_timer, (XtPointer) si); @@ -246,7 +268,7 @@ activate_lock_timer (XtPointer closure, XtIntervalId *id) saver_preferences *p = &si->prefs; if (p->verbose_p) - fprintf (stderr, "%s: timed out; activating lock\n", blurb()); + fprintf (stderr, "%s: timed out; activating lock.\n", blurb()); si->locked_p = True; #ifdef HAVE_XHPDISABLERESET @@ -362,11 +384,61 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id) } #endif /* HAVE_PROC_INTERRUPTS */ + if (active_p) reset_timers (si); + + check_for_clock_skew (si); +} + + +/* An unfortunate situation is this: the saver is not active, because the + user has been typing. The machine is a laptop. The user closes the lid + and suspends it. The CPU halts. Some hours later, the user opens the + lid. At this point, Xt's timers will fire, and xscreensaver will blank + the screen. + + So far so good -- well, not really, but it's the best that we can do, + since the OS doesn't send us a signal *before* shutdown -- but if the + user had delayed locking (lockTimeout > 0) then we should start off + in the locked state, rather than only locking N minutes from when the + lid was opened. Also, eschewing fading is probably a good idea, to + clamp down as soon as possible. + + We only do this when we'd be polling the mouse position anyway. + This amounts to an assumption that machines with APM support also + have /proc/interrupts. + */ +static void +check_for_clock_skew (saver_info *si) +{ + saver_preferences *p = &si->prefs; + time_t now = time ((time_t *) 0); + long shift = now - si->last_wall_clock_time; + +#ifdef DEBUG_TIMERS + if (p->verbose_p) + fprintf (stderr, "%s: checking wall clock (%d).\n", blurb(), + (si->last_wall_clock_time == 0 ? 0 : shift)); +#endif /* DEBUG_TIMERS */ + + if (si->last_wall_clock_time != 0 && + shift > (p->timeout / 1000)) + { + if (p->verbose_p) + fprintf (stderr, "%s: wall clock has jumped by %d:%02d:%02d!\n", + blurb(), + (shift / (60 * 60)), ((shift / 60) % 60), (shift % 60)); + + si->emergency_lock_p = True; + idle_timer ((XtPointer) si, 0); + } + + si->last_wall_clock_time = now; } + static void dispatch_event (saver_info *si, XEvent *event) { @@ -512,6 +584,12 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) /* Look, we've been idle long enough. We're done. */ goto DONE; } + else if (si->emergency_lock_p) + { + /* Oops, the wall clock has jumped far into the future, so + we need to lock down in a hurry! */ + goto DONE; + } else { /* The event went off, but it turns out that the user has not @@ -774,11 +852,11 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) Thanks to Nat Friedman for figuring out all of this crap. - Note that this only checks for lines with "keyboard" in them. Perhaps we - should also be checking for lines with "PS/2 Mouse" in them. But that - would obviously fail to work for regular serial mice, and obviously just - using COM1 would be bad news (turn off the screensaver because the modem - is active, yum.) + Note that this only checks for lines with "keyboard" or "PS/2 Mouse" in + them. If you have a serial mouse, it won't detect that, it will only detect + keyboard activity. That's because there's no way to tell the difference + between a serial mouse and a general serial port, and it would be somewhat + unfortunate to have the screensaver turn off when the modem on COM1 burped. */ @@ -816,8 +894,11 @@ proc_interrupts_activity_p (saver_info *si) static FILE *f0 = 0; FILE *f1 = 0; int fd; - static char last_line[255] = { 0, }; - char new_line[sizeof(last_line)]; + static char last_kbd_line[255] = { 0, }; + static char last_ptr_line[255] = { 0, }; + char new_line[sizeof(last_kbd_line)]; + Bool got_kbd = False, kbd_diff = False; + Bool got_ptr = False, ptr_diff = False; if (!f0) { @@ -867,17 +948,35 @@ proc_interrupts_activity_p (saver_info *si) /* Now read through the pseudo-file until we find the "keyboard" line. */ while (fgets (new_line, sizeof(new_line)-1, f1)) - if (strstr (new_line, "keyboard")) - { - Bool diff = (*last_line && - !!strcmp (new_line, last_line)); - strcpy (last_line, new_line); /* save this line for next time */ - fclose (f1); - return diff; - } + { + if (!got_kbd && strstr (new_line, "keyboard")) + { + kbd_diff = (*last_kbd_line && !!strcmp (new_line, last_kbd_line)); + strcpy (last_kbd_line, new_line); + got_kbd = True; + } + else if (!got_ptr && strstr (new_line, "PS/2 Mouse")) + { + ptr_diff = (*last_ptr_line && !!strcmp (new_line, last_ptr_line)); + strcpy (last_ptr_line, new_line); + got_ptr = True; + } + + if (got_kbd && got_ptr) + break; + } + + if (got_kbd || got_ptr) + { + fclose (f1); + return (kbd_diff || ptr_diff); + } - /* If we got here, we didn't find a "keyboard" line in the file at all. */ - fprintf (stderr, "%s: no keyboard data in %s?\n", blurb(), PROC_INTERRUPTS); + + /* If we got here, we didn't find either a "keyboard" or a "PS/2 Mouse" + line in the file at all. */ + fprintf (stderr, "%s: no keyboard or mouse data in %s?\n", + blurb(), PROC_INTERRUPTS); FAIL: if (f1) @@ -920,15 +1019,26 @@ watchdog_timer (XtPointer closure, XtIntervalId *id) if (si->screen_blanked_p) { - Bool running_p = screenhack_running_p(si); + Bool running_p = screenhack_running_p (si); + if (si->dbox_up_p) + { #ifdef DEBUG_TIMERS - if (si->prefs.verbose_p) - fprintf (stderr, "%s: watchdog timer raising %sscreen.\n", - blurb(), (running_p ? "" : "and clearing ")); + if (si->prefs.verbose_p) + fprintf (stderr, "%s: dialog box is up: not raising screen.\n", + blurb()); +#endif /* DEBUG_TIMERS */ + } + else + { +#ifdef DEBUG_TIMERS + if (si->prefs.verbose_p) + fprintf (stderr, "%s: watchdog timer raising %sscreen.\n", + blurb(), (running_p ? "" : "and clearing ")); #endif /* DEBUG_TIMERS */ - raise_window (si, True, True, running_p); + raise_window (si, True, True, running_p); + } if (!monitor_powered_on_p (si)) { @@ -938,6 +1048,12 @@ watchdog_timer (XtPointer closure, XtIntervalId *id) "killing running hacks.\n", blurb()); kill_screenhack (si); } + + /* Re-schedule this timer. The watchdog timer defaults to a bit less + than the hack cycle period, but is never longer than one hour. + */ + si->watchdog_id = 0; + reset_watchdog_timer (si, True); } } diff --git a/driver/windows.c b/driver/windows.c index 4945202a..a61788ba 100644 --- a/driver/windows.c +++ b/driver/windows.c @@ -41,6 +41,9 @@ # include #endif /* HAVE_MIT_SAVER_EXTENSION */ +#ifdef HAVE_XF86VMODE +# include +#endif /* HAVE_XF86VMODE */ #ifdef HAVE_XHPDISABLERESET # include @@ -136,7 +139,7 @@ grab_mouse (saver_info *si, Window w, Cursor cursor) { saver_preferences *p = &si->prefs; int status = XGrabPointer (si->dpy, w, True, ALL_POINTER_EVENTS, - GrabModeAsync, GrabModeAsync, None, + GrabModeAsync, GrabModeAsync, w, cursor, CurrentTime); if (status == GrabSuccess) si->mouse_grab_window = w; @@ -210,6 +213,50 @@ ungrab_keyboard_and_mouse (saver_info *si) } +int +move_mouse_grab (saver_info *si, Window to, Cursor cursor) +{ + Window old = si->mouse_grab_window; + + if (old == 0) + return grab_mouse (si, to, cursor); + else + { + saver_preferences *p = &si->prefs; + int status; + + XSync (si->dpy, False); + XGrabServer (si->dpy); /* ############ DANGER! */ + XSync (si->dpy, False); + + if (p->verbose_p) + fprintf(stderr, "%s: grabbing server...\n", blurb()); + + ungrab_mouse (si); + status = grab_mouse (si, to, cursor); + + if (status != GrabSuccess) /* Augh! */ + { + sleep (1); /* Note dramatic evil of sleeping + with server grabbed. */ + XSync (si->dpy, False); + status = grab_mouse (si, to, cursor); + } + + if (status != GrabSuccess) /* Augh! Try to get the old one back... */ + grab_mouse (si, to, cursor); + + XUngrabServer (si->dpy); + XSync (si->dpy, False); /* ###### (danger over) */ + + if (p->verbose_p) + fprintf(stderr, "%s: ungrabbing server.\n", blurb()); + + return status; + } +} + + /* Prints an error message to stderr and returns True if there is another xscreensaver running already. Silently returns False otherwise. */ Bool @@ -757,6 +804,106 @@ store_saver_id (saver_screen_info *ssi) } +/* Returns the area of the screen which the xscreensaver window should cover. + Normally this is the whole screen, but if the X server's root window is + actually larger than the monitor's displayable area, then we want to + operate in the currently-visible portion of the desktop instead. + */ +void +get_screen_viewport (saver_screen_info *ssi, + int *x_ret, int *y_ret, + int *w_ret, int *h_ret, + Bool verbose_p) +{ + int w = WidthOfScreen (ssi->screen); + int h = HeightOfScreen (ssi->screen); + +#ifdef HAVE_XF86VMODE + saver_info *si = ssi->global; + int screen_no = screen_number (ssi->screen); + int event, error; + int dot; + XF86VidModeModeLine ml; + int x, y; + + if (XF86VidModeQueryExtension (si->dpy, &event, &error) && + XF86VidModeGetModeLine (si->dpy, screen_no, &dot, &ml) && + XF86VidModeGetViewPort (si->dpy, screen_no, &x, &y)) + { + char msg[512]; + *x_ret = x; + *y_ret = y; + *w_ret = ml.hdisplay; + *h_ret = ml.vdisplay; + + if (*x_ret == 0 && *y_ret == 0 && *w_ret == w && *h_ret == h) + /* There is no viewport -- the screen does not scroll. */ + return; + + sprintf (msg, "%s: vp is %dx%d+%d+%d", + blurb(), *w_ret, *h_ret, *x_ret, *y_ret); + + + /* Apparently, though the server stores the X position in increments of + 1 pixel, it will only make changes to the *display* in some other + increment. With XF86_SVGA on a Thinkpad, the display only updates + in multiples of 8 pixels when in 8-bit mode, and in multiples of 4 + pixels in 16-bit mode. I don't know what it does in 24- and 32-bit + mode, because I don't have enough video memory to find out. + + I consider it a bug that XF86VidModeGetViewPort() is telling me the + server's *target* scroll position rather than the server's *actual* + scroll position. David Dawes agrees, and says they may fix this in + XFree86 4.0, but it's notrivial. + + He also confirms that this behavior is server-dependent, so the + actual scroll position cannot be reliably determined by the client. + So... that means the only solution is to provide a ``sandbox'' + around the blackout window -- we make the window be up to N pixels + larger than the viewport on both the left and right sides. That + means some part of the outer edges of each hack might not be + visible, but screw it. + + I'm going to guess that 16 pixels is enough, and that the Y dimension + doesn't have this problem. + + The drawback of doing this, of course, is that some of the screenhacks + will still look pretty stupid -- for example, "slidescreen" will cut + off the left and right edges of the grid, etc. + */ +# define FUDGE 16 + if (x > 0 && x < w - ml.hdisplay) /* not at left edge or right edge */ + { + /* Round X position down to next lower multiple of FUDGE. + Increase width by 2*FUDGE in case some server rounds up. + */ + *x_ret = ((x - 1) / FUDGE) * FUDGE; + *w_ret += (FUDGE * 2); + } +# undef FUDGE + + if (*x_ret != x || + *y_ret != y || + *w_ret != ml.hdisplay || + *h_ret != ml.vdisplay) + sprintf (msg + strlen(msg), "; fudged to %dx%d+%d+%d", + *w_ret, *h_ret, *x_ret, *y_ret); + + if (verbose_p) + fprintf (stderr, "%s.\n", msg); + + return; + } + +#endif /* HAVE_XF86VMODE */ + + *x_ret = 0; + *y_ret = 0; + *w_ret = w; + *h_ret = h; +} + + static void initialize_screensaver_window_1 (saver_screen_info *ssi) { @@ -772,10 +919,12 @@ initialize_screensaver_window_1 (saver_screen_info *ssi) XColor black; XSetWindowAttributes attrs; unsigned long attrmask; - int width = WidthOfScreen (ssi->screen); - int height = HeightOfScreen (ssi->screen); + int x, y, width, height; static Bool printed_visual_info = False; /* only print the message once. */ + get_screen_viewport (si->default_screen, &x, &y, &width, &height, + (p->verbose_p && !si->screen_blanked_p)); + black.red = black.green = black.blue = 0; if (ssi->cmap == DefaultColormapOfScreen (ssi->screen)) @@ -905,8 +1054,8 @@ initialize_screensaver_window_1 (saver_screen_info *ssi) { XWindowChanges changes; unsigned int changesmask = CWX|CWY|CWWidth|CWHeight|CWBorderWidth; - changes.x = 0; - changes.y = 0; + changes.x = x; + changes.y = y; changes.width = width; changes.height = height; changes.border_width = 0; @@ -919,9 +1068,11 @@ initialize_screensaver_window_1 (saver_screen_info *ssi) else { ssi->screensaver_window = - XCreateWindow (si->dpy, RootWindowOfScreen (ssi->screen), 0, 0, - width, height, 0, ssi->current_depth, InputOutput, + XCreateWindow (si->dpy, RootWindowOfScreen (ssi->screen), + x, y, width, height, + 0, ssi->current_depth, InputOutput, ssi->current_visual, attrmask, &attrs); + reset_stderr (ssi); store_activate_time(si, True); if (p->verbose_p) @@ -972,10 +1123,15 @@ raise_window (saver_info *si, if (si->demoing_p) inhibit_fade = True; - initialize_screensaver_window (si); + if (si->emergency_lock_p) + inhibit_fade = True; + + if (!dont_clear) + initialize_screensaver_window (si); + reset_watchdog_timer (si, True); - if (p->fade_p && p->fading_possible_p && !inhibit_fade) + if (p->fade_p && si->fading_possible_p && !inhibit_fade) { Window *current_windows = (Window *) calloc(sizeof(Window), si->nscreens); @@ -1098,6 +1254,17 @@ blank_screen (saver_info *si) store_vroot_property (si->dpy, ssi->screensaver_window, ssi->screensaver_window); + +#ifdef HAVE_XF86VMODE + { + int ev, er; + if (!XF86VidModeQueryExtension (si->dpy, &ev, &er) || + !XF86VidModeGetViewPort (si->dpy, i, + &ssi->blank_vp_x, + &ssi->blank_vp_y)) + ssi->blank_vp_x = ssi->blank_vp_y = -1; + } +#endif /* HAVE_XF86VMODE */ } store_activate_time (si, si->screen_blanked_p); raise_window (si, False, False, False); @@ -1116,6 +1283,7 @@ blank_screen (saver_info *si) #endif si->screen_blanked_p = True; + si->last_wall_clock_time = 0; return True; } @@ -1124,7 +1292,7 @@ void unblank_screen (saver_info *si) { saver_preferences *p = &si->prefs; - Bool unfade_p = (p->fading_possible_p && p->unfade_p); + Bool unfade_p = (si->fading_possible_p && p->unfade_p); int i; monitor_power_on (si); @@ -1248,6 +1416,7 @@ unblank_screen (saver_info *si) XUnmapWindow (si->dpy, si->screens[i].screensaver_window); si->screen_blanked_p = False; + si->last_wall_clock_time = 0; } @@ -1278,7 +1447,7 @@ select_visual (saver_screen_info *ssi, const char *visual_name) saver_preferences *p = &si->prefs; Bool install_cmap_p = p->install_cmap_p; Bool was_installed_p = (ssi->cmap != DefaultColormapOfScreen(ssi->screen)); - Visual *new_v; + Visual *new_v = 0; Bool got_it; if (visual_name && *visual_name) @@ -1293,7 +1462,18 @@ select_visual (saver_screen_info *ssi, const char *visual_name) visual_name = "default"; install_cmap_p = False; } - new_v = get_visual (ssi->screen, visual_name, True, False); +#ifdef DAEMON_USE_GL + else if (!strcmp(visual_name, "gl") || + !strcmp(visual_name, "GL")) + { + new_v = get_gl_visual (ssi->screen); + if (!new_v && p->verbose_p) + fprintf (stderr, "%s: no GL visuals.\n", progname); + } +#endif /* DAEMON_USE_GL */ + + if (!new_v) + new_v = get_visual (ssi->screen, visual_name, True, False); } else { diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c index 7c745831..cc169d27 100644 --- a/driver/xscreensaver-command.c +++ b/driver/xscreensaver-command.c @@ -44,7 +44,7 @@ Atom XA_VROOT; Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE; Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_TIME, XA_SELECT, XA_DEMO; static Atom XA_ACTIVATE, XA_DEACTIVATE, XA_CYCLE, XA_NEXT, XA_PREV, XA_EXIT; -static Atom XA_RESTART, XA_PREFS, XA_LOCK; +static Atom XA_RESTART, XA_PREFS, XA_LOCK, XA_THROTTLE, XA_UNTHROTTLE; static char *screensaver_version; static char *usage = "\n\ @@ -101,7 +101,16 @@ usage: %s -