============
+Changes since 3.02: * Made locking work when passwd aging is enabled.
+ * Added support for PAM (Pluggable Authentication
+ Modules.) It is still turned off by default, though,
+ since it doesn't seem to work on Solaris 2.6, and has
+ been behaving erratically on Red Hat 5.1.
+ * Made each possible authentication method be tried in
+ turn until one succeeds; this means that Kerberos is
+ being used, we will first check Kerberos, and if that
+ fails, will then consult the local password file.
+ Likewise with PAM.
+ * Save and restore the bits under the passwd dialog,
+ to avoid leaving a black rectangle behind when
+ unlocking is cancelled.
Changes since 3.01: * Not everyone has sys/select.h, sigh...
Changes since 3.00: * Some fixes to `reflect'.
* Configure tweaks.
*/
#undef HAVE_KERBEROS
+/* Define this if you want to use PAM (Pluggable Authentication Modules)
+ * to lock/unlock the screen, instead of standard /etc/passwd authentication.
+ */
+#undef HAVE_PAM
+
+/* If PAM is being used, this is the name of the PAM service that xscreensaver
+ * will authenticate as. It would be sensible to set this to "xscreensaver".
+ * However, since some systems already have a PAM service named "xlock"
+ * defined, we might as well use that.
+ */
+#define PAM_SERVICE_NAME "xlock"
/* 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
--with-kerberos Include support for Kerberos authentication,
if possible (this is the default.)
--without-kerberos Do not compile in support for Kerberos."
+ac_help="$ac_help
+ --with-pam Include support for PAM (Pluggable Authentication
+ Modules) if possible (this is the default.)
+ --without-pam Do not compile in support for PAM."
ac_help="$ac_help
--with-shadow Include support for shadow password authentication,
- if possible (this is the default, if no Kerberos.)
+ if possible (this is the default, if no Kerberos or
+ PAM.)
--without-shadow Do not compile in support for shadow passwords.
"
-echo -n "current directory: "
-pwd
+echo "current directory: `pwd`"
echo "command line was: $0 $@"
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:662: checking host system type" >&5
+echo "configure:666: checking host system type" >&5
host_alias=$host
case "$host_alias" in
# 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:686: checking for $ac_word" >&5
+echo "configure:690: 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
# 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:715: checking for $ac_word" >&5
+echo "configure:719: 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
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:767: 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.
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 773 "configure"
+#line 777 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
{ 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:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:801: 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:802: checking whether we are using GNU C" >&5
+echo "configure:806: 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
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$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:815: \"$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
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:826: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:830: 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
if test -z "$GCC"; then
echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
-echo "configure:856: checking how to request ANSI compilation" >&5
+echo "configure:860: checking how to request ANSI compilation" >&5
case "$host" in
*-hpux*)
echo "$ac_t""HPUX: adding -Ae" 1>&6
echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:880: checking whether the compiler works on ANSI C" >&5
+echo "configure:884: 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 <<EOF
-#line 885 "configure"
+#line 889 "configure"
#include "confdefs.h"
main(int ac, char **av) { return 0; }
EOF
-if { (eval echo configure:889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
else
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:938: checking how to run the C preprocessor" >&5
+echo "configure:942: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 953 "configure"
+#line 957 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 970 "configure"
+#line 974 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
# 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:1009: checking for a BSD compatible install" >&5
+echo "configure:1013: 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
INSTALL_DIRS='${INSTALL} -d'
echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1060: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
+echo "configure:1064: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
rm -rf conftestdir
if mkdir conftestdir; then
cd conftestdir >&-
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1071: checking whether \"mkdir -p\" creates intermediate directories" >&5
+echo "configure:1075: checking whether \"mkdir -p\" creates intermediate directories" >&5
rm -rf dir1
mkdir -p dir1/dir2 >&- 2>&-
if test -d dir1/dir2/. ; then
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1086: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1090: 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
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1114: checking for working const" >&5
+echo "configure:1118: 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 <<EOF
-#line 1119 "configure"
+#line 1123 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1189: checking for inline" >&5
+echo "configure:1193: 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 <<EOF
-#line 1196 "configure"
+#line 1200 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1230: checking for ANSI C header files" >&5
+echo "configure:1234: 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 <<EOF
-#line 1235 "configure"
+#line 1239 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf 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
-#line 1260 "configure"
+#line 1264 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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
-#line 1278 "configure"
+#line 1282 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1299 "configure"
+#line 1303 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1334: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1338: 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 <<EOF
-#line 1339 "configure"
+#line 1343 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1369: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1373: 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 <<EOF
-#line 1374 "configure"
+#line 1378 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
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:1415: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1419: 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 <<EOF
-#line 1420 "configure"
+#line 1424 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# 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:1453: checking for opendir in -ldir" >&5
+echo "configure:1457: 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
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1461 "configure"
+#line 1465 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:1472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1494: checking for opendir in -lx" >&5
+echo "configure:1498: 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
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1502 "configure"
+#line 1506 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1537: checking for mode_t" >&5
+echo "configure:1541: 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 <<EOF
-#line 1542 "configure"
+#line 1546 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1570: checking for pid_t" >&5
+echo "configure:1574: 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 <<EOF
-#line 1575 "configure"
+#line 1579 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1603: checking for size_t" >&5
+echo "configure:1607: 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 <<EOF
-#line 1608 "configure"
+#line 1612 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1636: checking return type of signal handlers" >&5
+echo "configure:1640: 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 <<EOF
-#line 1641 "configure"
+#line 1645 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:1658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1678: checking how to call gettimeofday" >&5
+echo "configure:1682: 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 <<EOF
-#line 1683 "configure"
+#line 1687 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
gettimeofday(&tv, &tzp);
; return 0; }
EOF
-if { (eval echo configure:1692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_gettimeofday_args=2
else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 1700 "configure"
+#line 1704 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
struct timeval tv; gettimeofday(&tv);
; return 0; }
EOF
-if { (eval echo configure:1708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_gettimeofday_args=1
else
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:1748: checking for $ac_func" >&5
+echo "configure:1752: 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 <<EOF
-#line 1753 "configure"
+#line 1757 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in sigaction syslog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1803: checking for $ac_func" >&5
+echo "configure:1807: 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 <<EOF
-#line 1808 "configure"
+#line 1812 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1860: checking for $ac_hdr" >&5
+echo "configure:1864: 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
-#line 1865 "configure"
+#line 1869 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
# 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:1929: checking for X" >&5
+echo "configure:1933: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 1991 "configure"
+#line 1995 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
+#line 2069 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
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:2178: checking whether -R must be followed by a space" >&5
+echo "configure:2182: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 2181 "configure"
+#line 2185 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_nospace=yes
else
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 2204 "configure"
+#line 2208 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_space=yes
else
# 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:2243: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2247: 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
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2251 "configure"
+#line 2255 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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:2284: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2288: 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
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2292 "configure"
+#line 2296 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# 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:2332: checking for gethostbyname" >&5
+echo "configure:2336: 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 <<EOF
-#line 2337 "configure"
+#line 2341 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2381: checking for gethostbyname in -lnsl" >&5
+echo "configure:2385: 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
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2389 "configure"
+#line 2393 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# -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:2430: checking for connect" >&5
+echo "configure:2434: 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 <<EOF
-#line 2435 "configure"
+#line 2439 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2479: checking for connect in -lsocket" >&5
+echo "configure:2483: 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
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2487 "configure"
+#line 2491 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:2522: checking for remove" >&5
+echo "configure:2526: 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 <<EOF
-#line 2527 "configure"
+#line 2531 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
; return 0; }
EOF
-if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2571: checking for remove in -lposix" >&5
+echo "configure:2575: 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
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2579 "configure"
+#line 2583 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
remove()
; return 0; }
EOF
-if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2614: checking for shmat" >&5
+echo "configure:2618: 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 <<EOF
-#line 2619 "configure"
+#line 2623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
; return 0; }
EOF
-if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2663: checking for shmat in -lipc" >&5
+echo "configure:2667: 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
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2671 "configure"
+#line 2675 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
shmat()
; return 0; }
EOF
-if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# 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:2715: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2719: 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
ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2723 "configure"
+#line 2727 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:2771: checking for X app-defaults directory" >&5
+echo "configure:2775: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 2918 "configure"
+#line 2922 "configure"
#include "confdefs.h"
#include <X11/XHPlib.h>
EOF
# Check for the availability of the XPointer typedef, and define it otherwise.
#
echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:2939: checking for XPointer" >&5
+echo "configure:2943: checking for XPointer" >&5
if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
+#line 2954 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {
XPointer foo = (XPointer) 0;
; return 0; }
EOF
-if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_xpointer=yes
else
# 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:3091: checking for regcmp in -lgen" >&5
+echo "configure:3095: 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
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3099 "configure"
+#line 3103 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
regcmp()
; return 0; }
EOF
-if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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:3147: checking for X11/Xmu/Error.h" >&5
+echo "configure:3151: 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
-#line 3152 "configure"
+#line 3156 "configure"
#include "confdefs.h"
#include <X11/Xmu/Error.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
case "$host" in
*-sunos4*)
echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
-echo "configure:3201: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3205: 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
# with X libraries because we know it's SunOS.
LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
cat > conftest.$ac_ext <<EOF
-#line 3214 "configure"
+#line 3218 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_sunos_xmu_bug=no
else
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:3237: checking whether the compiler understands -static" >&5
+echo "configure:3241: 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 <<EOF
-#line 3244 "configure"
+#line 3248 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_ld_static=yes
else
/*)
echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
-echo "configure:3296: checking for SGI SCREEN_SAVER headers" >&5
+echo "configure:3300: checking for SGI SCREEN_SAVER headers" >&5
d=$with_sgi/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
-echo "configure:3306: checking for SGI SCREEN_SAVER libs" >&5
+echo "configure:3310: checking for SGI SCREEN_SAVER libs" >&5
d=$with_sgi/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:3344: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3348: 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
-#line 3349 "configure"
+#line 3353 "configure"
#include "confdefs.h"
#include <X11/extensions/XScreenSaver.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
-echo "configure:3407: checking for MIT-SCREEN-SAVER headers" >&5
+echo "configure:3411: checking for MIT-SCREEN-SAVER headers" >&5
d=$with_mit/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
-echo "configure:3417: checking for MIT-SCREEN-SAVER libs" >&5
+echo "configure:3421: checking for MIT-SCREEN-SAVER libs" >&5
d=$with_mit/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:3456: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3460: 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
-#line 3461 "configure"
+#line 3465 "configure"
#include "confdefs.h"
#include <X11/extensions/scrnsaver.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3510: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3514: 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
ac_save_LIBS="$LIBS"
LIBS="-lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3518 "configure"
+#line 3522 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XScreenSaverRegister()
; return 0; }
EOF
-if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3580: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3584: 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
ac_save_LIBS="$LIBS"
LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3588 "configure"
+#line 3592 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XScreenSaverRegister()
; return 0; }
EOF
-if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:3645: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:3649: 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
ac_save_LIBS="$LIBS"
LIBS="-lXss -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3653 "configure"
+#line 3657 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XScreenSaverRegister()
; return 0; }
EOF
-if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
-echo "configure:3724: checking for XIDLE headers" >&5
+echo "configure:3728: checking for XIDLE headers" >&5
d=$with_xidle/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
-echo "configure:3734: checking for XIDLE libs" >&5
+echo "configure:3738: checking for XIDLE libs" >&5
d=$with_xidle/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:3772: checking for X11/extensions/xidle.h" >&5
+echo "configure:3776: 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
-#line 3777 "configure"
+#line 3781 "configure"
#include "confdefs.h"
#include <X11/extensions/xidle.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
-echo "configure:3834: checking for XSHM headers" >&5
+echo "configure:3838: checking for XSHM headers" >&5
d=$with_xshm/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
-echo "configure:3844: checking for XSHM libs" >&5
+echo "configure:3848: checking for XSHM libs" >&5
d=$with_xshm/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:3884: checking for X11/extensions/XShm.h" >&5
+echo "configure:3888: 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
-#line 3889 "configure"
+#line 3893 "configure"
#include "confdefs.h"
#include <X11/extensions/XShm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
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:3928: checking for sys/ipc.h" >&5
+echo "configure:3932: 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
-#line 3933 "configure"
+#line 3937 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
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:3973: checking for sys/shm.h" >&5
+echo "configure:3977: 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
-#line 3978 "configure"
+#line 3982 "configure"
#include "confdefs.h"
#include <sys/shm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:4032: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:4036: 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
ac_save_LIBS="$LIBS"
LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4040 "configure"
+#line 4044 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XShmQueryExtension()
; return 0; }
EOF
-if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
-echo "configure:4110: checking for SGI-VIDEO-CONTROL headers" >&5
+echo "configure:4114: checking for SGI-VIDEO-CONTROL headers" >&5
d=$with_sgivc/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
-echo "configure:4120: checking for SGI-VIDEO-CONTROL libs" >&5
+echo "configure:4124: checking for SGI-VIDEO-CONTROL libs" >&5
d=$with_sgivc/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:4160: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:4164: 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
-#line 4165 "configure"
+#line 4169 "configure"
#include "confdefs.h"
#include <X11/extensions/XSGIvc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:4213: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:4217: 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
ac_save_LIBS="$LIBS"
LIBS="-lXsgivc -lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4221 "configure"
+#line 4225 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XSGIvcQueryGammaMap()
; return 0; }
EOF
-if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
-echo "configure:4290: checking for DPMS headers" >&5
+echo "configure:4294: checking for DPMS headers" >&5
d=$with_dpms/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
-echo "configure:4300: checking for DPMS libs" >&5
+echo "configure:4304: checking for DPMS libs" >&5
d=$with_dpms/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:4340: checking for X11/extensions/dpms.h" >&5
+echo "configure:4344: 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
-#line 4345 "configure"
+#line 4349 "configure"
#include "confdefs.h"
#include <X11/extensions/dpms.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
-echo "configure:4393: checking for DPMSInfo in -lXdpms" >&5
+echo "configure:4397: 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
ac_save_LIBS="$LIBS"
LIBS="-lXdpms -lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4401 "configure"
+#line 4405 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
DPMSInfo()
; return 0; }
EOF
-if { (eval echo configure:4412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
-echo "configure:4475: checking for Motif headers" >&5
+echo "configure:4479: checking for Motif headers" >&5
d=$with_motif/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
-echo "configure:4485: checking for Motif libs" >&5
+echo "configure:4489: checking for Motif libs" >&5
d=$with_motif/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
/*)
echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
-echo "configure:4530: checking for Athena headers" >&5
+echo "configure:4534: checking for Athena headers" >&5
d=$with_athena/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
-echo "configure:4540: checking for Athena libs" >&5
+echo "configure:4544: checking for Athena libs" >&5
d=$with_athena/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:4603: checking for Xm/Xm.h" >&5
+echo "configure:4607: 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
-#line 4608 "configure"
+#line 4612 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
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:4653: checking for X11/Xaw/Dialog.h" >&5
+echo "configure:4657: 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
-#line 4658 "configure"
+#line 4662 "configure"
#include "confdefs.h"
#include <X11/Xaw/Dialog.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
-echo "configure:4703: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
+echo "configure:4707: 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
ac_save_LIBS="$LIBS"
LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4711 "configure"
+#line 4715 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
Xaw3dComputeTopShadowRGB()
; return 0; }
EOF
-if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# 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:4799: checking for XawViewportSetCoordinates in Viewport.h" >&5
+echo "configure:4803: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 4811 "configure"
+#line 4815 "configure"
#include "confdefs.h"
#include <X11/Xaw/Viewport.h>
EOF
have_lesstif=no
if test "$have_motif" = yes ; then
echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
-echo "configure:4840: checking whether Motif is really LessTif" >&5
+echo "configure:4844: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 4851 "configure"
+#line 4855 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
int main() {
long vers = LesstifVersion;
; return 0; }
EOF
-if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_lesstif=yes
else
ltv=unknown
echo unknown > conftest-lt
echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
-echo "configure:4886: checking LessTif version number" >&5
+echo "configure:4890: 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
ac_cv_lesstif_version_string=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 4901 "configure"
+#line 4905 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <Xm/Xm.h>
exit(0);
}
EOF
-if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ltv=`cat conftest-lt`
ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:4964: checking for XpQueryExtension in -lXp" >&5
+echo "configure:4968: 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
ac_save_LIBS="$LIBS"
LIBS="-lXp -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4972 "configure"
+#line 4976 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XpQueryExtension()
; return 0; }
EOF
-if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
-echo "configure:5028: checking for XPM headers" >&5
+echo "configure:5032: checking for XPM headers" >&5
d=$with_xpm/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
-echo "configure:5038: checking for XPM libs" >&5
+echo "configure:5042: checking for XPM libs" >&5
d=$with_xpm/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:5076: checking for X11/xpm.h" >&5
+echo "configure:5080: 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
-#line 5081 "configure"
+#line 5085 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for GL headers""... $ac_c" 1>&6
-echo "configure:5140: checking for GL headers" >&5
+echo "configure:5144: checking for GL headers" >&5
d=$with_gl/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for GL libs""... $ac_c" 1>&6
-echo "configure:5150: checking for GL libs" >&5
+echo "configure:5154: checking for GL libs" >&5
d=$with_gl/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:5191: checking for GL/gl.h" >&5
+echo "configure:5195: 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
-#line 5196 "configure"
+#line 5200 "configure"
#include "confdefs.h"
#include <GL/gl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
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:5232: checking for GL/glx.h" >&5
+echo "configure:5236: 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
-#line 5237 "configure"
+#line 5241 "configure"
#include "confdefs.h"
#include <GL/glx.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
# to link against.
#
echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
-echo "configure:5279: checking whether GL is really MesaGL" >&5
+echo "configure:5283: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 5291 "configure"
+#line 5295 "configure"
#include "confdefs.h"
#include <GL/glx.h>
EOF
unset ac_cv_mesagl_version_string
echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
-echo "configure:5332: checking MesaGL version number" >&5
+echo "configure:5336: 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 <<EOF
-#line 5337 "configure"
+#line 5341 "configure"
#include "confdefs.h"
#include <GL/gl.h>
-#configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
+configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
EOF
ac_save_CPPFLAGS="$CPPFLAGS"
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ # M4 sucks!!
+
mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -n \
- 's/^#configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
+ 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
+
+
rm -f conftest.$ac_ext
CPPFLAGS="$ac_save_CPPFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:5398: checking for glBindTexture in -l$gl_lib_1" >&5
+echo "configure:5406: 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
ac_save_LIBS="$LIBS"
LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5406 "configure"
+#line 5414 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
glBindTexture()
; return 0; }
EOF
-if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
-echo "configure:5471: checking for XReadDisplay headers" >&5
+echo "configure:5479: checking for XReadDisplay headers" >&5
d=$with_readdisplay/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
-echo "configure:5481: checking for XReadDisplay libs" >&5
+echo "configure:5489: checking for XReadDisplay libs" >&5
d=$with_readdisplay/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:5519: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:5527: 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
-#line 5524 "configure"
+#line 5532 "configure"
#include "confdefs.h"
#include <X11/extensions/readdisplay.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
-echo "configure:5580: checking for Iris Video headers" >&5
+echo "configure:5588: checking for Iris Video headers" >&5
d=$with_sgivideo/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
-echo "configure:5590: checking for Iris Video libs" >&5
+echo "configure:5598: checking for Iris Video libs" >&5
d=$with_sgivideo/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:5628: checking for dmedia/vl.h" >&5
+echo "configure:5636: 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
-#line 5633 "configure"
+#line 5641 "configure"
#include "confdefs.h"
#include <dmedia/vl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test "$have_sgivideo" = yes; then
have_sgivideo=no
echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
-echo "configure:5663: checking for vlOpenVideo in -lvl" >&5
+echo "configure:5671: 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
ac_save_LIBS="$LIBS"
LIBS="-lvl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5671 "configure"
+#line 5679 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
vlOpenVideo()
; return 0; }
EOF
-if { (eval echo configure:5682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
case "$with_zippy_req" in
/*)
echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
-echo "configure:5750: checking for $with_zippy_req" >&5
+echo "configure:5758: checking for $with_zippy_req" >&5
if test -x "$with_zippy_req" ; then
echo "$ac_t""yes" 1>&6
else
# 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:5764: checking for $ac_word" >&5
+echo "configure:5772: 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
# 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:5810: checking for $ac_word" >&5
+echo "configure:5818: 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
# 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:5843: checking for $ac_word" >&5
+echo "configure:5851: 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
if test -n "$emacs_exe" ; then
echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:5877: checking for emacs yow" >&5
+echo "configure:5885: checking for emacs yow" >&5
#
# get emacs to tell us where the libexec directory is.
#
if test -z "$ac_cv_zippy_program" ; then
echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
-echo "configure:5899: checking for xemacs yow" >&5
+echo "configure:5907: checking for xemacs yow" >&5
if test -n "$xemacs_exe" ; then
#
# get xemacs to tell us where the libexec directory is.
# 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:5945: checking for $ac_word" >&5
+echo "configure:5953: 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
# 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:5980: checking for $ac_word" >&5
+echo "configure:5988: 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
with_kerberos_req=unspecified
have_shadow=no
with_shadow_req=unspecified
+have_pam=no
+with_pam_req=unspecified
need_setuid=no
# Check whether --enable-locking or --disable-locking was given.
if test "$enable_vt_locking" = yes; then
echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
-echo "configure:6073: checking for the VT_LOCKSWITCH ioctl" >&5
+echo "configure:6083: 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 <<EOF
-#line 6078 "configure"
+#line 6088 "configure"
#include "confdefs.h"
#include <fcntl.h>
#include <sys/ioctl.h>
int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
; return 0; }
EOF
-if { (eval echo configure:6087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_vt_lockswitch=yes
else
/*)
echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
-echo "configure:6141: checking for Kerberos headers" >&5
+echo "configure:6151: checking for Kerberos headers" >&5
d=$with_kerberos/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
-echo "configure:6151: checking for Kerberos libs" >&5
+echo "configure:6161: checking for Kerberos libs" >&5
d=$with_kerberos/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
if test "$with_kerberos" = yes; then
echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:6182: checking for Kerberos" >&5
+echo "configure:6192: checking for Kerberos" >&5
if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 6193 "configure"
+#line 6203 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:6200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_kerberos=yes
else
# from Tim Showalter <tjs+@andrew.cmu.edu>
PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
echo $ac_n "checking for res_search""... $ac_c" 1>&6
-echo "configure:6224: checking for res_search" >&5
+echo "configure:6234: 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 <<EOF
-#line 6229 "configure"
+#line 6239 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char res_search(); below. */
; return 0; }
EOF
-if { (eval echo configure:6252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_res_search=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
-echo "configure:6270: checking for res_search in -lresolv" >&5
+echo "configure:6280: 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
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6278 "configure"
+#line 6288 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
res_search()
; return 0; }
EOF
-if { (eval echo configure:6289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "error: must be yes or no: --with-kerberos=$with_kerberos"
exit 1
fi
+
+ # Check for PAM.
+ # Check whether --with-pam or --without-pam was given.
+if test "${with_pam+set}" = set; then
+ withval="$with_pam"
+ with_pam="$withval"; with_pam_req="$withval"
+else
+ with_pam=no
+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
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
+echo "configure:6349: checking for PAM headers" >&5
+ d=$with_pam/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 PAM libs""... $ac_c" 1>&6
+echo "configure:6359: checking for PAM libs" >&5
+ d=$with_pam/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_pam_req="yes"
+ with_pam=$with_pam_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-pam 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_pam" = yes; then
+ echo $ac_n "checking for PAM""... $ac_c" 1>&6
+echo "configure:6390: checking for PAM" >&5
+if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat > conftest.$ac_ext <<EOF
+#line 6401 "configure"
+#include "confdefs.h"
+#include <security/pam_appl.h>
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:6408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_pam=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_pam=no
+fi
+rm -f conftest*
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
+echo "$ac_t""$ac_cv_pam" 1>&6
+ if test "$ac_cv_pam" = yes ; then
+ have_pam=yes
+ cat >> confdefs.h <<\EOF
+#define HAVE_PAM 1
+EOF
+
+ PASSWD_LIBS="${PASSWD_LIBS} -lpam -ldl"
+ fi
+ elif test "$with_pam" != no; then
+ echo "error: must be yes or no: --with-pam=$with_pam"
+ exit 1
+ fi
# Next, check for the nine billion variants of shadow passwords...
- passwd_cruft_done=no
+ pwent_cruft_done=no
# Check whether --with-shadow or --without-shadow was given.
if test "${with_shadow+set}" = set; then
withval="$with_shadow"
/*)
echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
-echo "configure:6339: checking for shadow password headers" >&5
+echo "configure:6454: checking for shadow password headers" >&5
d=$with_shadow/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
-echo "configure:6349: checking for shadow password libs" >&5
+echo "configure:6464: checking for shadow password libs" >&5
d=$with_shadow/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
if test "$with_shadow" = no; then
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
elif test "$with_shadow" != yes; then
echo "error: must be yes or no: --with-shadow=$with_shadow"
exit 1
# Sun's "adjunct" passwords.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6390: checking for Sun-style shadow passwords" >&5
+echo "configure:6505: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 6401 "configure"
+#line 6516 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->pwa_passwd;
; return 0; }
EOF
-if { (eval echo configure:6414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sun_adjunct=yes
else
if test "$ac_cv_sun_adjunct" = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
cat >> confdefs.h <<\EOF
#define HAVE_ADJUNCT_PASSWD 1
EOF
# DEC and SCO so-called "enhanced" security.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6443: checking for DEC-style shadow passwords" >&5
+echo "configure:6558: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 6454 "configure"
+#line 6569 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
pw = p->ufld.fd_encrypt;
; return 0; }
EOF
-if { (eval echo configure:6471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_enhanced_passwd=yes
else
if test $ac_cv_enhanced_passwd = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
cat >> confdefs.h <<\EOF
#define HAVE_ENHANCED_PASSWD 1
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:6497: checking for getprpwnam in -lprot" >&5
+echo "configure:6612: 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
ac_save_LIBS="$LIBS"
LIBS="-lprot -lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6505 "configure"
+#line 6620 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getprpwnam()
; return 0; }
EOF
-if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
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:6536: checking for getprpwnam in -lsecurity" >&5
+echo "configure:6651: 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
ac_save_LIBS="$LIBS"
LIBS="-lsecurity $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6544 "configure"
+#line 6659 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getprpwnam()
; return 0; }
EOF
-if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# HP's entry in the "Not Invented Here" Sweepstakes.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6584: checking for HP-style shadow passwords" >&5
+echo "configure:6699: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 6595 "configure"
+#line 6710 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->pw_passwd;
; return 0; }
EOF
-if { (eval echo configure:6608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_hpux_passwd=yes
else
if test "$ac_cv_hpux_passwd" = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
cat >> confdefs.h <<\EOF
#define HAVE_HPUX_PASSWD 1
EOF
# on HPUX, bigcrypt is in -lsec
echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:6633: checking for bigcrypt in -lsec" >&5
+echo "configure:6748: 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
ac_save_LIBS="$LIBS"
LIBS="-lsec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6641 "configure"
+#line 6756 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
bigcrypt()
; return 0; }
EOF
-if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# Traditional (ha!) shadow passwords.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:6679: checking for generic shadow passwords" >&5
+echo "configure:6794: 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
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 6690 "configure"
+#line 6805 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->sp_pwdp;
; return 0; }
EOF
-if { (eval echo configure:6702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_shadow=yes
else
if test "$ac_cv_shadow" = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
cat >> confdefs.h <<\EOF
#define HAVE_SHADOW_PASSWD 1
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:6728: checking for getspnam in -lc" >&5
+echo "configure:6843: 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
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6736 "configure"
+#line 6851 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getspnam()
; return 0; }
EOF
-if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$have_getspnam" = no ; then
echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:6769: checking for getspnam in -lgen" >&5
+echo "configure:6884: 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
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6777 "configure"
+#line 6892 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getspnam()
; return 0; }
EOF
-if { (eval echo configure:6788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# program is setuid. So, guess that we've got this lossage to contend with
# if /etc/master.passwd exists, and default to a setuid installation.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6819: checking for FreeBSD-style shadow passwords" >&5
+echo "configure:6934: 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
echo "$ac_t""$ac_cv_master_passwd" 1>&6
if test "$ac_cv_master_passwd" = yes; then
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
fi
fi
# 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:6840: checking for crypt in -lc" >&5
+echo "configure:6955: 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
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6848 "configure"
+#line 6963 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:6859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$have_crypt" = no ; then
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:6881: checking for crypt in -lcrypt" >&5
+echo "configure:6996: 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
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6889 "configure"
+#line 7004 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:6900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
-
if test \! -z "$includedir" ; then
INCLUDES="-I$includedir"
fi
fi
if test "$have_kerberos" = yes; then
- PASSWD_SRCS='$(KERBEROS_SRCS)'
- PASSWD_OBJS='$(KERBEROS_OBJS)'
-else
- PASSWD_SRCS='$(PWENT_SRCS)'
- PASSWD_OBJS='$(PWENT_OBJS)'
+ PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
+ PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
fi
+if test "$have_pam" = yes; then
+ PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
+ PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
+ INSTALL_PAM="install-pam"
+fi
+ PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
+ PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
+
if test "$enable_locking" = yes; then
LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
+
# Print some warnings before emitting the Makefiles.
warn 'Use of Kerberos was requested, but it was not found.'
fi
+if test "$with_pam_req" = yes -a "$have_pam" = no ; then
+ warn 'Use of PAM was requested, but it was not found.'
+fi
+
if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
warn 'Use of shadow passwords was requested, but they were not found.'
fi
s%@INSTALL_SETUID@%$INSTALL_SETUID%g
s%@INSTALL_DIRS@%$INSTALL_DIRS%g
s%@NEED_SETUID@%$NEED_SETUID%g
+s%@INSTALL_PAM@%$INSTALL_PAM%g
s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
s%@TOOLKIT_SRCS@%$TOOLKIT_SRCS%g
AC_INIT(driver/subprocs.c)
-echo -n "current directory: "
-pwd
+echo "current directory: `pwd`"
echo "command line was: $0 $@"
AC_CONFIG_HEADER(config.h)
#line __oline__ "configure"
#include "confdefs.h"
#include <GL/gl.h>
-#configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
+configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
EOF
ac_save_CPPFLAGS="$CPPFLAGS"
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ # M4 sucks!!
+ changequote(X,Y)
mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | sed -n \
- 's/^#configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
+ 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
+ changequote([,])
+
rm -f conftest.$ac_ext
CPPFLAGS="$ac_save_CPPFLAGS"
with_kerberos_req=unspecified
have_shadow=no
with_shadow_req=unspecified
+have_pam=no
+with_pam_req=unspecified
need_setuid=no
AC_ARG_ENABLE(locking,[
echo "error: must be yes or no: --with-kerberos=$with_kerberos"
exit 1
fi
+
+ # Check for PAM.
+ AC_ARG_WITH(pam,
+[ --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...)
+
+ HANDLE_X_PATH_ARG(with_pam, --with-pam, PAM)
+
+ if test "$with_pam" = yes; then
+ AC_CACHE_CHECK([for PAM], ac_cv_pam,
+ [AC_TRY_X_COMPILE([#include <security/pam_appl.h>],,
+ [ac_cv_pam=yes],
+ [ac_cv_pam=no])])
+ if test "$ac_cv_pam" = yes ; then
+ have_pam=yes
+ AC_DEFINE(HAVE_PAM)
+ PASSWD_LIBS="${PASSWD_LIBS} -lpam -ldl"
+ fi
+ elif test "$with_pam" != no; then
+ echo "error: must be yes or no: --with-pam=$with_pam"
+ exit 1
+ fi
# Next, check for the nine billion variants of shadow passwords...
- passwd_cruft_done=no
+ pwent_cruft_done=no
AC_ARG_WITH(shadow,
[ --with-shadow Include support for shadow password authentication,
- if possible (this is the default, if no Kerberos.)
+ if possible (this is the default, if no Kerberos or
+ PAM.)
--without-shadow Do not compile in support for shadow passwords.
],
[with_shadow="$withval"; with_shadow_req="$withval"],[with_shadow=yes])
HANDLE_X_PATH_ARG(with_shadow, --with-shadow, shadow password)
if test "$with_shadow" = no; then
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
elif test "$with_shadow" != yes; then
echo "error: must be yes or no: --with-shadow=$with_shadow"
exit 1
# Sun's "adjunct" passwords.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
AC_CACHE_CHECK([for Sun-style shadow passwords], ac_cv_sun_adjunct,
[AC_TRY_X_COMPILE([#include <stdlib.h>
#include <unistd.h>
if test "$ac_cv_sun_adjunct" = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
AC_DEFINE(HAVE_ADJUNCT_PASSWD)
fi
fi
# DEC and SCO so-called "enhanced" security.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
AC_CACHE_CHECK([for DEC-style shadow passwords], ac_cv_enhanced_passwd,
[AC_TRY_X_COMPILE([#include <stdlib.h>
#include <unistd.h>
if test $ac_cv_enhanced_passwd = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
AC_DEFINE(HAVE_ENHANCED_PASSWD)
# On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
# HP's entry in the "Not Invented Here" Sweepstakes.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
AC_CACHE_CHECK([for HP-style shadow passwords], ac_cv_hpux_passwd,
[AC_TRY_X_COMPILE([#include <stdlib.h>
#include <unistd.h>
if test "$ac_cv_hpux_passwd" = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
AC_DEFINE(HAVE_HPUX_PASSWD)
# on HPUX, bigcrypt is in -lsec
# Traditional (ha!) shadow passwords.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
AC_CACHE_CHECK([for generic shadow passwords], ac_cv_shadow,
[AC_TRY_X_COMPILE([#include <stdlib.h>
#include <unistd.h>
if test "$ac_cv_shadow" = yes; then
have_shadow=yes
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
AC_DEFINE(HAVE_SHADOW_PASSWD)
# On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
# program is setuid. So, guess that we've got this lossage to contend with
# if /etc/master.passwd exists, and default to a setuid installation.
#
- if test "$passwd_cruft_done" = no ; then
+ if test "$pwent_cruft_done" = no ; then
AC_CACHE_CHECK([for FreeBSD-style shadow passwords], ac_cv_master_passwd,
[if test -f /etc/master.passwd ; then
ac_cv_master_passwd=yes
fi])
if test "$ac_cv_master_passwd" = yes; then
need_setuid=yes
- passwd_cruft_done=yes
+ pwent_cruft_done=yes
fi
fi
AC_CHECK_LIB(c, crypt, [have_crypt=yes])
if test "$have_crypt" = no ; then
AC_CHECK_LIB(crypt, crypt,
- [have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"])
+ [have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"])
fi
fi
-
if test \! -z "$includedir" ; then
INCLUDES="-I$includedir"
fi
fi
if test "$have_kerberos" = yes; then
- PASSWD_SRCS='$(KERBEROS_SRCS)'
- PASSWD_OBJS='$(KERBEROS_OBJS)'
-else
- PASSWD_SRCS='$(PWENT_SRCS)'
- PASSWD_OBJS='$(PWENT_OBJS)'
+ PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
+ PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
+fi
+if test "$have_pam" = yes; then
+ PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
+ PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
+ INSTALL_PAM="install-pam"
fi
+ PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
+ PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
+
if test "$enable_locking" = yes; then
LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
AC_SUBST(INSTALL_SETUID)
AC_SUBST(INSTALL_DIRS)
AC_SUBST(NEED_SETUID)
+AC_SUBST(INSTALL_PAM)
AC_SUBST(SGI_VIDEO_OBJS)
AC_SUBST(SGI_VIDEO_LIBS)
warn 'Use of Kerberos was requested, but it was not found.'
fi
+if test "$with_pam_req" = yes -a "$have_pam" = no ; then
+ warn 'Use of PAM was requested, but it was not found.'
+fi
+
if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
warn 'Use of shadow passwords was requested, but they were not found.'
fi
ATHENA_SRCS = dialogs-Xaw.c
ATHENA_OBJS = dialogs-Xaw.o
-PWENT_SRCS = passwd.c
-PWENT_OBJS = passwd.o
+PWENT_SRCS = passwd-pwent.c
+PWENT_OBJS = passwd-pwent.o
-KERBEROS_SRCS = kpasswd.c
-KERBEROS_OBJS = kpasswd.o
+KERBEROS_SRCS = passwd-kerberos.c
+KERBEROS_OBJS = passwd-kerberos.o
-LOCK_SRCS_1 = lock.c
-LOCK_OBJS_1 = lock.o
+PAM_SRCS = passwd-pam.c
+PAM_OBJS = passwd-pam.o
+
+LOCK_SRCS_1 = lock.c passwd.c
+LOCK_OBJS_1 = lock.o passwd.o
TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c
LOCK_SRCS = @LOCK_SRCS@
LOCK_OBJS = @LOCK_OBJS@
-SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
- $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
- $(UTILS_SRC)/visual.c $(UTILS_SRC)/xroger.c \
- $(UTILS_SRC)/spline.c $(UTILS_SRC)/yarandom.c
-SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
- $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
- $(UTILS_BIN)/visual.o $(UTILS_BIN)/xroger.o \
- $(UTILS_BIN)/spline.o $(UTILS_BIN)/yarandom.o
-
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 \
$(UTILS_BIN)/visual.o
+SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
+ $(UTILS_SRC)/xroger.c $(UTILS_SRC)/spline.c \
+ $(UTILS_SRC)/yarandom.c \
+ $(DEMO_UTIL_SRCS)
+SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
+ $(UTILS_BIN)/xroger.o $(UTILS_BIN)/spline.o \
+ $(UTILS_BIN)/yarandom.o \
+ $(DEMO_UTIL_OBJS)
+
SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c \
xset.c splash.c setuid.c stderr.c
SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o \
HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h
MEN = xscreensaver.man xscreensaver-demo.man \
xscreensaver-command.man
-EXTRAS = README Makefile.in XScreenSaver.ad.in dialogs.xd .gdbinit
+EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
+ .gdbinit
VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
$(MOTIF_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) $(KERBEROS_SRCS) \
- $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) $(HDRS) \
- $(TEST_SRCS) $(MEN)
+ $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
+ $(HDRS) $(TEST_SRCS) $(MEN)
all: $(EXES)
-install: install-program install-ad install-man
+install: install-program install-ad install-man @INSTALL_PAM@
uninstall: uninstall-program uninstall-ad uninstall-man
install-strip:
rm -f $(man1dir)/$$instname ; \
done
+install-pam:
+ @src="$(srcdir)/xscreensaver.pam" ; \
+ dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
+ < ../config.h` ; \
+ dir=/etc/pam.d ; \
+ conf=/etc/pam.conf ; \
+ \
+ if [ -d $$dir ] ; then \
+ echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
+ $(INSTALL_DATA) $$src $$dir/$$dest ; \
+ if [ ! -f $$dir/$$dest ]; then \
+ e=echo ; \
+ $$e "" ;\
+ $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
+ $$e " Authentication Modules (PAM). However, we were unable to" ;\
+ $$e " install the file $$dir/$$dest. PAM is unlikely to work" ;\
+ $$e " without this file (and old-style password authentication" ;\
+ $$e " will be used instead, which may or may not work.)" ;\
+ $$e "" ;\
+ fi ; \
+ elif [ -f $$conf ]; then \
+ if ( grep $$dest $$conf >/dev/null ); then \
+ true ; \
+ else \
+ e=echo ; \
+ $$e "" ;\
+ $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
+ $$e " Authentication Modules (PAM). To complete the installation";\
+ $$e " of PAM support, you must add this to the file $$conf:" ;\
+ $$e "" ;\
+ cat $$src | grep -v '#%' | sed "s/^/ $$dest /" ; \
+ echo ""; \
+ fi ; \
+ fi
+
+
clean:
-rm -f *.o a.out core $(EXES) XScreenSaver_ad.h
$(UTILS_BIN)/spline.o: $(UTILS_SRC)/spline.c
$(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
-$(UTIL_OBJS):
+$(SAVER_UTIL_OBJS):
cd $(UTILS_BIN) ; \
$(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
-TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PWENT_OBJS) $(TOOLKIT_OBJS) \
- subprocs.o setuid.o demo.o splash.o prefs.o \
- $(UTIL_OBJS)
+TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
+ subprocs.o setuid.o splash.o prefs.o \
+ $(SAVER_UTIL_OBJS)
test-passwd.o: XScreenSaver_ad.h
test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
xscreensaver.o: $(UTILS_SRC)/yarandom.h
xscreensaver.o: $(UTILS_SRC)/resources.h
xscreensaver.o: $(UTILS_SRC)/visual.h
+xscreensaver.o: $(UTILS_SRC)/usleep.h
xscreensaver.o: XScreenSaver_ad.h
windows.o: ../config.h
windows.o: $(srcdir)/xscreensaver.h
dialogs-Xm.o: $(UTILS_SRC)/visual.h
dialogs-Xaw.o: ../config.h
dialogs-Xaw.o: $(UTILS_SRC)/visual.h
-passwd.o: ../config.h
+passwd-pwent.o: ../config.h
lock.o: ../config.h
lock.o: $(srcdir)/xscreensaver.h
lock.o: $(srcdir)/prefs.h
lock.o: $(UTILS_SRC)/resources.h
+passwd.o: ../config.h
demo.o: ../config.h
demo.o: $(UTILS_SRC)/version.h
demo.o: $(srcdir)/prefs.h
demo.o: $(UTILS_SRC)/resources.h
demo.o: $(UTILS_SRC)/visual.h
demo.o: $(srcdir)/remote.h
+demo.o: $(UTILS_SRC)/usleep.h
demo.o: XScreenSaver_ad.h
prefs.o: ../config.h
prefs.o: $(srcdir)/prefs.h
test-passwd.o: $(srcdir)/prefs.h
test-passwd.o: $(UTILS_SRC)/resources.h
test-passwd.o: $(UTILS_SRC)/version.h
+test-passwd.o: $(UTILS_SRC)/visual.h
test-passwd.o: XScreenSaver_ad.h
test-uid.o: ../config.h
test-xdpms.o: ../config.h
! a screen saver and locker for the X window system
! by Jamie Zawinski
!
-! version 3.02
-! 25-Oct-98
+! version 3.03
+! 15-Nov-98
!
! See "man xscreensaver" for more info. The latest version is always
! available at http://www.jwz.org/xscreensaver/
#include "resources.h" /* for parse_time() */
#include "visual.h" /* for has_writable_cells() */
#include "remote.h" /* for xscreensaver_command() */
+#include "usleep.h"
#include <stdio.h>
#include <string.h>
memcpy (short_version, screensaver_id + 17, 4);
short_version [4] = 0;
+ p->db = db;
+ p->fading_possible_p = True;
+ load_init_file (p);
+ *p2 = *p;
+
/* Now that Xt has been initialized, we can set our `progname' variable
to something that makes more sense (like our "real" argv[0].)
progname = real_progname;
- p->db = db;
- p->fading_possible_p = True;
- load_init_file (p);
- *p2 = *p;
-
#ifdef HAVE_ATHENA
global_prefs_kludge = p; /* I hate C so much... */
#endif /* HAVE_ATHENA */
+++ /dev/null
-module 'XScreenSaver'
-applicationName = 'XScreenSaver';
-generateNameC = 'dialogs.c';
-generateNameUIL = '';
-generateNameResDB = 'dialogs.ad';
-generateUidFile = '';
-generateMask = 1507557;
-useMask = 1;
-value
-object 'passwd_dialog' : XmDialogShell {
- arguments {
- name = 'passwdDialog';
- XmNtitle= 'XScreenSaver';
- XmNallowShellResize= true;
- };
-object 'passwd_form' : XmForm {
- arguments {
- name = 'passwdForm';
- XmNautoUnmanage= false;
- };
-object 'roger_label' : XmDrawnButton {
- arguments {
- name = 'rogerLabel';
- XmNwidth= 150;
- };
-};
-object 'passwd_label1' : XmLabel {
- arguments {
- name = 'passwdLabel1';
- XmNlabelString= 'XScreenSaver %s';
- XmNalignment= 0;
- };
-};
-object '' : XmLabel {
- arguments {
- name = 'passwdLabel2';
- XmNlabelString= 'This display is locked.';
- XmNalignment= 0;
- };
-};
-object 'passwd_label3' : XmLabel {
- arguments {
- name = 'passwdLabel3';
- XmNlabelString= 'Please type %s\'s password to unlock it.';
- XmNalignment= 0;
- };
-};
-object 'passwd_text' : XmTextField {
- arguments {
- name = 'passwdText';
- };
-};
-object '' : XmSeparator {
- arguments {
- };
-};
-object 'passwd_done' : XmPushButton {
- arguments {
- name = 'passwdDone';
- XmNlabelString= 'Done';
- };
-};
-object 'passwd_cancel' : XmPushButton {
- arguments {
- name = 'passwdCancel';
- XmNlabelString= 'Cancel';
- };
-};
- attachments {
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 1 0 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 1 0 4;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 3 1 4;
- XmNbottomAttachment = 3 3 4;
- XmNtopAttachment = 1 0 4;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 3 1 4;
- XmNbottomAttachment = 3 4 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 1 0 30;
- XmNleftAttachment = 3 1 4;
- XmNbottomAttachment = 3 5 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 3 1 4;
- XmNbottomAttachment = 3 6 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 1 0 0;
- XmNleftAttachment = 3 1 0;
- XmNbottomAttachment = 3 7 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 3 1 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 3 7 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 0 0 0;
- };
- };
-};
-};
-object 'resources_dialog' : XmDialogShell {
- arguments {
- name = 'resourcesDialog';
- XmNtitle= 'XScreenSaver';
- XmNallowShellResize= true;
- };
-object 'resources_form' : XmForm {
- arguments {
- name = 'resourcesForm';
- XmNautoUnmanage= false;
- };
-object '' : XmLabel {
- arguments {
- name = 'resourcesLabel';
- XmNlabelString= 'XScreenSaver Parameters';
- };
-};
-object '' : XmSeparator {
- arguments {
- };
-};
-object '' : XmLabel {
- arguments {
- name = 'timeoutLabel';
- XmNlabelString= 'Timeout Minutes';
- XmNalignment= * 2;
- };
-};
-object '' : XmLabel {
- arguments {
- name = 'cycleLabel';
- XmNlabelString= 'Cycle Seconds';
- XmNalignment= * 2;
- };
-};
-object '' : XmLabel {
- arguments {
- name = 'fadeSecondsLabel';
- XmNlabelString= 'Fade Seconds';
- XmNalignment= * 2;
- };
-};
-object '' : XmLabel {
- arguments {
- name = 'fadeTicksLabel';
- XmNlabelString= 'Fade Ticks';
- XmNalignment= * 2;
- };
-};
-object '' : XmLabel {
- arguments {
- name = 'lockLabel';
- XmNlabelString= 'Lock Timeout';
- XmNalignment= * 2;
- };
-};
-object '' : XmLabel {
- arguments {
- name = 'passwdLabel';
- XmNlabelString= 'Password Timeout';
- XmNalignment= * 2;
- };
-};
-object 'timeout_text' : XmTextField {
- arguments {
- name = 'timeoutText';
- XmNcolumns= 5;
- };
-};
-object 'cycle_text' : XmTextField {
- arguments {
- name = 'cycleText';
- XmNcolumns= 5;
- };
-};
-object 'fade_text' : XmTextField {
- arguments {
- name = 'fadeSecondsText';
- XmNcolumns= 5;
- };
-};
-object 'ticks_text' : XmTextField {
- arguments {
- name = 'fadeTicksText';
- XmNcolumns= 5;
- };
-};
-object 'lock_time_text' : XmTextField {
- arguments {
- name = 'passwdText';
- XmNcolumns= 5;
- };
-};
-object 'passwd_time_text' : XmTextField {
- arguments {
- name = 'lockText';
- XmNcolumns= 5;
- };
-};
-object 'verbose_toggle' : XmToggleButton {
- arguments {
- name = 'verboseToggle';
- XmNlabelString= 'Verbose';
- XmNalignment= * 0;
- };
-};
-object 'cmap_toggle' : XmToggleButton {
- arguments {
- name = 'cmapToggle';
- XmNlabelString= 'Install Colormap';
- XmNalignment= * 0;
- };
-};
-object 'fade_toggle' : XmToggleButton {
- arguments {
- name = 'fadeToggle';
- XmNlabelString= 'Fade Colormap';
- XmNalignment= * 0;
- };
-};
-object 'unfade_toggle' : XmToggleButton {
- arguments {
- name = 'unfadeToggle';
- XmNlabelString= 'Unfade Colormap';
- XmNalignment= * 0;
- };
-};
-object 'lock_toggle' : XmToggleButton {
- arguments {
- name = 'lockToggle';
- XmNlabelString= 'Require Password';
- XmNalignment= * 0;
- };
-};
-object '' : XmSeparator {
- arguments {
- };
-};
-object 'res_done' : XmPushButton {
- arguments {
- name = 'resourcesDone';
- XmNlabelString= 'Done';
- };
-};
-object 'res_cancel' : XmPushButton {
- arguments {
- name = 'resourcesCancel';
- XmNlabelString= 'Cancel';
- };
-};
- attachments {
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 1 0 4;
- XmNtopAttachment = 1 0 4;
- };
- attachment {
- XmNrightAttachment = 1 0 0;
- XmNleftAttachment = 1 0 0;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 1 4;
- };
- attachment {
- XmNrightAttachment = 3 9 4;
- XmNleftAttachment = 1 0 20;
- XmNbottomAttachment = 4 9;
- XmNtopAttachment = 3 2 4;
- };
- attachment {
- XmNrightAttachment = 3 10 4;
- XmNleftAttachment = 1 0 20;
- XmNbottomAttachment = 4 10 0;
- XmNtopAttachment = 4 10 0;
- };
- attachment {
- XmNrightAttachment = 3 11 4;
- XmNleftAttachment = 1 0 20;
- XmNbottomAttachment = 4 11 0;
- XmNtopAttachment = 4 11 0;
- };
- attachment {
- XmNrightAttachment = 3 12 4;
- XmNleftAttachment = 1 0 20;
- XmNbottomAttachment = 4 12 0;
- XmNtopAttachment = 4 12 0;
- };
- attachment {
- XmNrightAttachment = 3 13 4;
- XmNleftAttachment = 1 0 19;
- XmNbottomAttachment = 4 13 0;
- XmNtopAttachment = 4 13 0;
- };
- attachment {
- XmNrightAttachment = 3 14 4;
- XmNleftAttachment = 1 0 14;
- XmNbottomAttachment = 4 14 0;
- XmNtopAttachment = 4 14 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 1 0 141;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 2 4;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 4 9 0;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 9 2;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 4 10 0;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 10 2;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 4 11 0;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 11 2;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 4 12 0;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 12 2;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 4 13 0;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 13 4;
- };
- attachment {
- XmNrightAttachment = 1 0 20;
- XmNleftAttachment = 3 9 20;
- XmNbottomAttachment = 4 9 0;
- XmNtopAttachment = 3 2 4;
- };
- attachment {
- XmNrightAttachment = 1 0 20;
- XmNleftAttachment = 4 15 0;
- XmNbottomAttachment = 4 10 0;
- XmNtopAttachment = 4 10 0;
- };
- attachment {
- XmNrightAttachment = 1 0 20;
- XmNleftAttachment = 4 16 0;
- XmNbottomAttachment = 4 11 0;
- XmNtopAttachment = 4 11 0;
- };
- attachment {
- XmNrightAttachment = 1 0 20;
- XmNleftAttachment = 4 17 0;
- XmNbottomAttachment = 4 12 0;
- XmNtopAttachment = 4 12 0;
- };
- attachment {
- XmNrightAttachment = 1 0 20;
- XmNleftAttachment = 4 18 0;
- XmNbottomAttachment = 4 13 0;
- XmNtopAttachment = 4 13 0;
- };
- attachment {
- XmNrightAttachment = 1 0;
- XmNleftAttachment = 1 0;
- XmNbottomAttachment = 3 21 4;
- XmNtopAttachment = 3 14 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 1 0 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 3 21 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 0 0 0;
- };
- };
-};
-};
-object 'demo_dialog' : XmDialogShell {
- arguments {
- name = 'demoDialog';
- XmNtitle= 'XScreenSaver';
- XmNmaxWidth= 500;
- XmNallowShellResize= true;
- };
-object 'demo_form' : XmForm {
- arguments {
- name = 'demoForm';
- XmNautoUnmanage= false;
- };
-object 'label1' : XmLabel {
- arguments {
- name = 'label1';
- XmNlabelString= 'XScreenSaver %s';
- };
-};
-object 'label2' : XmLabel {
- arguments {
- name = 'label2';
- XmNlabelString= 'Copyright © 1991-1994 by Jamie Zawinski <jwz@jwz.org>';
- };
-};
-object 'text_area' : XmScrolledList {
- arguments {
- name = 'textArea';
- };
-object '' : XmScrollBar {
- arguments {
- name = 'ListhScrollBar';
- };
-};
-object '' : XmScrollBar {
- arguments {
- name = 'ListvScrollBar';
- };
-};
-object 'demo_list' : XmList {
- arguments {
- name = 'demoList';
- XmNvisibleItemCount= 10;
- XmNautomaticSelection= true;
- XmNlistSizePolicy= 2;
- };
-};
-};
-object 'text_line' : XmTextField {
- arguments {
- name = 'textLine';
- };
-};
-object 'vline' : XmSeparator {
- arguments {
- name = 'vline';
- };
-};
-object 'next' : XmPushButton {
- arguments {
- name = 'next';
- XmNlabelString= 'Run Next';
- };
-};
-object 'prev' : XmPushButton {
- arguments {
- name = 'prev';
- XmNlabelString= 'Run Previous';
- };
-};
-object 'edit' : XmPushButton {
- arguments {
- name = 'edit';
- XmNlabelString= 'Edit Parameters';
- };
-};
-object 'done' : XmPushButton {
- arguments {
- name = 'done';
- XmNlabelString= 'Exit Demo Mode';
- };
-};
-object 'restart' : XmPushButton {
- arguments {
- name = 'restart';
- XmNlabelString= 'Restart Screen Saver';
- };
-};
-object 'spacer' : XmLabel {
- arguments {
- name = 'spacer';
- XmNlabelString= * ' ';
- };
-};
- attachments {
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 1 0 4;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 1 0 5;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 1 0 4;
- XmNbottomAttachment = 0 0 0;
- XmNtopAttachment = 3 1 4;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 1 0 4;
- XmNbottomAttachment = 3 4 4;
- XmNtopAttachment = 3 2 4;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 1 0 4;
- XmNbottomAttachment = 3 5 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 1 0 4;
- XmNbottomAttachment = 3 6 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 1 0 3;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 0 0 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 3 6 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 4 6 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 3 7 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 4 7 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 3 8 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 4 8 0;
- };
- attachment {
- XmNrightAttachment = 0 0 0;
- XmNleftAttachment = 3 9 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 4 9 0;
- };
- attachment {
- XmNrightAttachment = 1 0 4;
- XmNleftAttachment = 3 10 4;
- XmNbottomAttachment = 1 0 4;
- XmNtopAttachment = 4 10 0;
- };
- };
-};
-};
-end module;
+++ /dev/null
-/* kpasswd.c --- verify kerberos passwords.
- * written by Nat Lanza (magus@cs.cmu.edu) for
- * xscreensaver, Copyright (c) 1993-1997 Jamie Zawinski <jwz@jwz.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation. No representations are made about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#ifndef NO_LOCKING /* whole file */
-
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <krb.h>
-#include <des.h>
-
-#if !defined(VMS) && !defined(HAVE_ADJUNCT_PASSWD)
-# include <pwd.h>
-#endif
-
-
-#ifdef __bsdi__
-# include <sys/param.h>
-# if _BSDI_VERSION >= 199608
-# define BSD_AUTH
-# endif
-#endif /* __bsdi__ */
-
-/* blargh */
-#undef Bool
-#undef True
-#undef False
-#define Bool int
-#define True 1
-#define False 0
-
-/* The user information we need to store */
-static char realm[REALM_SZ];
-static char name[ANAME_SZ];
-static char inst[INST_SZ];
-static char *tk_file;
-
-
-/* Called at startup to grab user, instance, and realm information
- from the user's ticketfile (remember, name.inst@realm). Since we're
- using tf_get_pname(), this should work even if your kerberos username
- isn't the same as your local username. We grab the ticket at startup
- time so that even if your ticketfile dies while the screen's locked
- we'll still have the information to unlock it.
-
- Problems: the password dialog currently displays local username, so if
- you have some non-standard name/instance when you run xscreensaver,
- you'll need to remember what it was when unlocking, or else you lose.
-
- Also, we use des_string_to_key(), so if you have an AFS password
- (encrypted with ka_StringToKey()), you'll lose. Get a kerberos password;
- it isn't that hard.
-
- Like the original lock_init, we return false if something went wrong.
- We don't use the arguments we're given, though.
- */
-Bool
-lock_init (int argc, char **argv)
-{
- int k_errno;
-
- memset(name, 0, sizeof(name));
- memset(inst, 0, sizeof(inst));
-
- /* find out where the user's keeping his tickets.
- squirrel it away for later use. */
- tk_file = tkt_string();
-
- /* open ticket file or die trying. */
- if ((k_errno = tf_init(tk_file, R_TKT_FIL))) {
- return False;
- }
-
- /* same with principal and instance names */
- if ((k_errno = tf_get_pname(name)) ||
- (k_errno = tf_get_pinst(inst))) {
- return False;
- }
-
- /* close the ticketfile to release the lock on it. */
- tf_close();
-
- /* figure out what realm we're authenticated to. this ought
- to be the local realm, but it pays to be sure. */
- if ((k_errno = krb_get_tf_realm(tk_file, realm))) {
- return False;
- }
-
- /* last-minute sanity check on what we got. */
- if ((strlen(name)+strlen(inst)+strlen(realm)+3) >
- (REALM_SZ + ANAME_SZ + INST_SZ + 3)) {
- return False;
- }
-
- /* success */
- return True;
-}
-
-
-/* des_string_to_key() wants this. If C didn't suck, we could have an
- anonymous function do this. Even a local one. But it does, so here
- we are. Calling it ive_got_your_local_function_right_here_buddy()
- would have been rude.
- */
-static int
-key_to_key(char *user, char *instance, char *realm, char *passwd, C_Block key)
-{
- memcpy(key, passwd, sizeof(des_cblock));
- return (0);
-}
-
-/* Called to see if the user's typed password is valid. We do this by asking
- the kerberos server for a ticket and checking to see if it gave us one.
- We need to move the ticketfile first, or otherwise we end up updating the
- user's tkfile with new tickets. This would break services like zephyr that
- like to stay authenticated, and it would screw with AFS authentication at
- some sites. So, we do a quick, painful hack with a tmpfile.
- */
-Bool
-passwd_valid_p (const char *typed_passwd)
-{
- C_Block mitkey;
- Bool success;
- char *newtkfile;
-
- /* temporarily switch to a new ticketfile.
- I'm not using tmpnam() because it isn't entirely portable.
- this could probably be fixed with autoconf. */
- newtkfile = malloc(80 * sizeof(char));
- memset(newtkfile, 0, sizeof(newtkfile));
-
- sprintf(newtkfile, "/tmp/xscrn-%i", getpid());
-
- krb_set_tkt_string(newtkfile);
-
- /* encrypt the typed password. if you have an AFS password instead
- of a kerberos one, you lose *right here*. If you want to use AFS
- passwords, you can use ka_StringToKey() instead. As always, ymmv. */
- des_string_to_key(typed_passwd, mitkey);
-
- if (krb_get_in_tkt(name, inst, realm, "krbtgt", realm, DEFAULT_TKT_LIFE,
- key_to_key, NULL, mitkey) != 0) {
- success = False;
- } else {
- success = True;
- }
-
- /* quickly block out the tempfile and password to prevent snooping,
- then restore the old ticketfile and cleean up a bit. */
-
- dest_tkt();
- krb_set_tkt_string(tk_file);
- free(newtkfile);
- memset(mitkey, 0, sizeof(mitkey));
-
-
- /* Did we verify successfully? */
- return success;
-}
-
-#endif /* NO_LOCKING -- whole file */
extern int validate_user(char *name, char *password);
static Bool
-vms_passwd_valid_p(char *pw)
+vms_passwd_valid_p(char *pw, Bool verbose_p)
{
return (validate_user (getenv("USER"), typed_passwd) == 1);
}
int i_beam;
float ratio;
+ Position x, y;
Dimension width;
Dimension height;
+ Dimension border_width;
char *heading_label;
char *body_label;
Dimension thermo_field_x, thermo_field_y;
Dimension thermo_field_height;
+
+ Pixmap save_under;
};
make_passwd_window (saver_info *si)
{
struct passwd *p = getpwuid (getuid ());
- int x, y, bw;
XSetWindowAttributes attrs;
unsigned long attrmask = 0;
Screen *screen = si->default_screen->screen;
Dimension w = WidthOfScreen(screen);
Dimension h = HeightOfScreen(screen);
if (si->prefs.debug_p) w /= 2;
- x = ((w + pw->width) / 2) - pw->width;
- y = ((h + pw->height) / 2) - pw->height;
- if (x < 0) x = 0;
- if (y < 0) y = 0;
+ 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;
}
- bw = get_integer_resource ("passwd.borderWidth", "Dialog.BorderWidth");
+ pw->border_width = get_integer_resource ("passwd.borderWidth",
+ "Dialog.BorderWidth");
si->passwd_dialog =
XCreateWindow (si->dpy,
RootWindowOfScreen(screen),
- x, y, pw->width, pw->height, bw,
+ pw->x, pw->y, pw->width, pw->height, pw->border_width,
DefaultDepthOfScreen (screen), InputOutput,
DefaultVisualOfScreen(screen),
attrmask, &attrs);
XSetWindowBackground (si->dpy, si->passwd_dialog, pw->background);
+
+ /* Before mapping the window, save the bits that are underneath the
+ rectangle the window will occlude. When we lower the window, we
+ restore these bits. This works, because the running screenhack
+ has already been sent SIGSTOP, so we know nothing else is drawing
+ right now! */
+ {
+ XGCValues gcv;
+ GC gc;
+ pw->save_under = XCreatePixmap (si->dpy,
+ si->default_screen->screensaver_window,
+ pw->width + (pw->border_width*2) + 1,
+ pw->height + (pw->border_width*2) + 1,
+ si->default_screen->current_depth);
+ gcv.function = GXcopy;
+ gc = XCreateGC (si->dpy, pw->save_under, GCFunction, &gcv);
+ XCopyArea (si->dpy, si->default_screen->screensaver_window,
+ pw->save_under, gc,
+ pw->x - pw->border_width, pw->y - pw->border_width,
+ pw->width + (pw->border_width*2) + 1,
+ pw->height + (pw->border_width*2) + 1,
+ 0, 0);
+ XFreeGC (si->dpy, gc);
+ }
+
XMapRaised (si->dpy, si->passwd_dialog);
XSync (si->dpy, False);
si->passwd_dialog = 0;
}
+ if (pw->save_under)
+ {
+ XGCValues gcv;
+ GC gc;
+ gcv.function = GXcopy;
+ gc = XCreateGC (si->dpy, si->default_screen->screensaver_window,
+ GCFunction, &gcv);
+ XCopyArea (si->dpy, pw->save_under,
+ si->default_screen->screensaver_window, gc,
+ 0, 0,
+ pw->width + (pw->border_width*2) + 1,
+ pw->height + (pw->border_width*2) + 1,
+ pw->x - pw->border_width, pw->y - pw->border_width);
+ XFreePixmap (si->dpy, pw->save_under);
+ pw->save_under = 0;
+ XFreeGC (si->dpy, gc);
+ }
+
if (pw->heading_label) free (pw->heading_label);
if (pw->body_label) free (pw->body_label);
if (pw->user_label) free (pw->user_label);
static void
handle_passwd_key (saver_info *si, XKeyEvent *event)
{
+ saver_preferences *p = &si->prefs;
passwd_dialog_data *pw = si->pw_data;
int pw_size = sizeof (pw->typed_passwd) - 1;
char *typed_passwd = pw->typed_passwd;
case '\012': case '\015': /* Enter */
if (pw->state != pw_read)
; /* already done? */
- else if (passwd_valid_p (typed_passwd))
- pw->state = pw_ok;
else if (typed_passwd[0] == 0)
pw->state = pw_null;
else
- pw->state = pw_fail;
+ {
+ update_passwd_window (si, "Checking...", pw->ratio);
+ XSync (si->dpy, False);
+ if (passwd_valid_p (typed_passwd, p->verbose_p))
+ pw->state = pw_ok;
+ else
+ pw->state = pw_fail;
+ update_passwd_window (si, "", pw->ratio);
+ }
break;
default:
}
#endif /* HAVE_SYSLOG */
+ if (si->pw_data->state == pw_fail)
+ XBell (si->dpy, False);
+
if (si->pw_data->state == pw_ok && si->unlock_failures != 0)
{
if (si->unlock_failures == 1)
{
si->pw_data->i_beam = 0;
update_passwd_window (si, msg, 0.0);
- XBell (si->dpy, False);
XSync (si->dpy, False);
sleep (1);
--- /dev/null
+/* kpasswd.c --- verify kerberos passwords.
+ * written by Nat Lanza (magus@cs.cmu.edu) for
+ * xscreensaver, Copyright (c) 1993-1997, 1998 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifndef NO_LOCKING /* whole file */
+
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <krb.h>
+#include <des.h>
+
+#if !defined(VMS) && !defined(HAVE_ADJUNCT_PASSWD)
+# include <pwd.h>
+#endif
+
+
+#ifdef __bsdi__
+# include <sys/param.h>
+# if _BSDI_VERSION >= 199608
+# define BSD_AUTH
+# endif
+#endif /* __bsdi__ */
+
+/* blargh */
+#undef Bool
+#undef True
+#undef False
+#define Bool int
+#define True 1
+#define False 0
+
+/* The user information we need to store */
+static char realm[REALM_SZ];
+static char name[ANAME_SZ];
+static char inst[INST_SZ];
+static char *tk_file;
+
+
+/* Called at startup to grab user, instance, and realm information
+ from the user's ticketfile (remember, name.inst@realm). Since we're
+ using tf_get_pname(), this should work even if your kerberos username
+ isn't the same as your local username. We grab the ticket at startup
+ time so that even if your ticketfile dies while the screen's locked
+ we'll still have the information to unlock it.
+
+ Problems: the password dialog currently displays local username, so if
+ you have some non-standard name/instance when you run xscreensaver,
+ you'll need to remember what it was when unlocking, or else you lose.
+
+ Also, we use des_string_to_key(), so if you have an AFS password
+ (encrypted with ka_StringToKey()), you'll lose. Get a kerberos password;
+ it isn't that hard.
+
+ Like the original lock_init, we return false if something went wrong.
+ We don't use the arguments we're given, though.
+ */
+Bool
+kerberos_lock_init (int argc, char **argv, Bool verbose_p)
+{
+ int k_errno;
+
+ memset(name, 0, sizeof(name));
+ memset(inst, 0, sizeof(inst));
+
+ /* find out where the user's keeping his tickets.
+ squirrel it away for later use. */
+ tk_file = tkt_string();
+
+ /* open ticket file or die trying. */
+ if ((k_errno = tf_init(tk_file, R_TKT_FIL))) {
+ return False;
+ }
+
+ /* same with principal and instance names */
+ if ((k_errno = tf_get_pname(name)) ||
+ (k_errno = tf_get_pinst(inst))) {
+ return False;
+ }
+
+ /* close the ticketfile to release the lock on it. */
+ tf_close();
+
+ /* figure out what realm we're authenticated to. this ought
+ to be the local realm, but it pays to be sure. */
+ if ((k_errno = krb_get_tf_realm(tk_file, realm))) {
+ return False;
+ }
+
+ /* last-minute sanity check on what we got. */
+ if ((strlen(name)+strlen(inst)+strlen(realm)+3) >
+ (REALM_SZ + ANAME_SZ + INST_SZ + 3)) {
+ return False;
+ }
+
+ /* success */
+ return True;
+}
+
+
+/* des_string_to_key() wants this. If C didn't suck, we could have an
+ anonymous function do this. Even a local one. But it does, so here
+ we are. Calling it ive_got_your_local_function_right_here_buddy()
+ would have been rude.
+ */
+static int
+key_to_key(char *user, char *instance, char *realm, char *passwd, C_Block key)
+{
+ memcpy(key, passwd, sizeof(des_cblock));
+ return (0);
+}
+
+/* Called to see if the user's typed password is valid. We do this by asking
+ the kerberos server for a ticket and checking to see if it gave us one.
+ We need to move the ticketfile first, or otherwise we end up updating the
+ user's tkfile with new tickets. This would break services like zephyr that
+ like to stay authenticated, and it would screw with AFS authentication at
+ some sites. So, we do a quick, painful hack with a tmpfile.
+ */
+Bool
+kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p)
+{
+ C_Block mitkey;
+ Bool success;
+ char *newtkfile;
+
+ /* temporarily switch to a new ticketfile.
+ I'm not using tmpnam() because it isn't entirely portable.
+ this could probably be fixed with autoconf. */
+ newtkfile = malloc(80 * sizeof(char));
+ memset(newtkfile, 0, sizeof(newtkfile));
+
+ sprintf(newtkfile, "/tmp/xscrn-%i", getpid());
+
+ krb_set_tkt_string(newtkfile);
+
+ /* encrypt the typed password. if you have an AFS password instead
+ of a kerberos one, you lose *right here*. If you want to use AFS
+ passwords, you can use ka_StringToKey() instead. As always, ymmv. */
+ des_string_to_key(typed_passwd, mitkey);
+
+ if (krb_get_in_tkt(name, inst, realm, "krbtgt", realm, DEFAULT_TKT_LIFE,
+ key_to_key, NULL, mitkey) != 0) {
+ success = False;
+ } else {
+ success = True;
+ }
+
+ /* quickly block out the tempfile and password to prevent snooping,
+ then restore the old ticketfile and cleean up a bit. */
+
+ dest_tkt();
+ krb_set_tkt_string(tk_file);
+ free(newtkfile);
+ memset(mitkey, 0, sizeof(mitkey));
+
+
+ /* Did we verify successfully? */
+ return success;
+}
+
+#endif /* NO_LOCKING -- whole file */
--- /dev/null
+/* passwd-pam.c --- verifying typed passwords with PAM
+ * (Pluggable Authentication Modules.)
+ * written by Bill Nottingham <notting@redhat.com> (and jwz) for
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifndef NO_LOCKING /* whole file */
+
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+extern char *blurb(void);
+
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+#include <security/pam_appl.h>
+
+#include <sys/stat.h>
+
+
+/* blargh */
+#undef Bool
+#undef True
+#undef False
+#define Bool int
+#define True 1
+#define False 0
+
+#undef countof
+#define countof(x) (sizeof((x))/sizeof(*(x)))
+
+static int pam_conversation (int nmsgs,
+ const struct pam_message **msg,
+ struct pam_response **resp,
+ void *closure);
+
+struct pam_closure {
+ const char *user;
+ const char *typed_passwd;
+ Bool verbose_p;
+};
+
+
+/* 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
+ between "authentication of the FOO service is not allowed" and "the
+ user typed the wrong password."
+
+ On RedHat 5.1 systems, if a service name is not known, it defaults to
+ being not allowed (because the fallback service, /etc/pam.d/other, is
+ set to `pam_deny'.)
+
+ On Solaris 2.6 systems, unknown services default to authenticating normally.
+
+ So, we could simply require that the person who installs xscreensaver
+ set up an "xscreensaver" PAM service. However, if we went that route,
+ it would have a really awful failure mode: the failure mode would be that
+ xscreensaver was willing to *lock* the screen, but would be unwilling to
+ *unlock* the screen. (With the non-PAM password code, the analagous
+ situation -- security not being configured properly, for example do to the
+ executable not being installed as setuid root -- the failure mode is much
+ more palettable, in that xscreensaver will refuse to *lock* the screen,
+ because it can know up front that there is no password that will work.)
+
+ Another route would be to have the service name to consult be computed at
+ compile-time (perhaps with a configure option.) However, that doesn't
+ really solve the problem, because it means that the same executable might
+ work fine on one machine, but refuse to unlock when run on another
+ machine.
+
+ Another alternative would be to look in /etc/pam.conf or /etc/pam.d/ at
+ runtime to see what services actually exist. But I think that's no good,
+ because who is to say that the PAM info is actually specified in those
+ files? Opening and reading those files is not a part of the PAM client
+ API, so it's not guarenteed to work on any given system.
+
+ An alternative I tried was to specify a list of services to try, and to
+ try them all in turn ("xscreensaver", "xlock", "xdm", and "login").
+ This worked, but it was slow (and I also had to do some contortions to
+ work around bugs in Linux PAM 0.64-3.)
+
+ So what we do today is, try PAM once, and if that fails, try the usual
+ getpwent() method. So if PAM doesn't work, it will at least make an
+ attempt at looking up passwords in /etc/passwd or /etc/shadow instead.
+
+ This all kind of blows. I'm not sure what else to do.
+ */
+
+
+/* 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.
+ */
+Bool
+pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p)
+{
+ const char *service = PAM_SERVICE_NAME;
+ pam_handle_t *pamh = 0;
+ int status = -1;
+ struct pam_conv pc;
+ struct pam_closure c;
+ char *user = 0;
+
+ struct passwd *p = getpwuid (getuid ());
+ if (!p) return False;
+
+ user = strdup (p->pw_name);
+
+ c.user = user;
+ c.typed_passwd = typed_passwd;
+ c.verbose_p = verbose_p;
+
+ pc.conv = &pam_conversation;
+ pc.appdata_ptr = (void *) &c;
+
+
+ /* Initialize PAM.
+ */
+ status = pam_start (service, c.user, &pc, &pamh);
+ if (verbose_p)
+ fprintf (stderr, "%s: pam_start (\"%s\", \"%s\", ...) ==> %d (%s)\n",
+ blurb(), service, c.user,
+ status, pam_strerror (pamh, status));
+ if (status != PAM_SUCCESS) goto DONE;
+
+# ifdef HAVE_PAM_FAIL_DELAY
+ pam_fail_delay (pamh, 0); /* We handle delays ourself. */
+# endif /* HAVE_PAM_FAIL_DELAY */
+
+ /* #### We should set PAM_TTY to the display we're using, but we
+ don't have that handy from here. So set it to :0.0, which is a
+ good guess (and has the bonus of counting as a "secure tty" as
+ far as PAM is concerned...)
+ */
+ {
+ const char *tty = ":0.0";
+ 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));
+ }
+
+ /* Try to authenticate as the current user.
+ */
+ status = pam_authenticate (pamh, 0);
+ if (verbose_p)
+ fprintf (stderr, "%s: pam_authenticate (...) ==> %d (%s)\n",
+ blurb(), status, pam_strerror(pamh, status));
+ if (status == PAM_SUCCESS) /* Win! */
+ goto DONE;
+
+ /* If that didn't work, set the user to root, and try to authenticate again.
+ */
+ c.user = "root";
+ 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));
+ if (status != PAM_SUCCESS) goto DONE;
+
+ status = pam_authenticate (pamh, 0);
+ if (verbose_p)
+ fprintf (stderr, "%s: pam_authenticate (...) ==> %d (%s)\n",
+ blurb(), status, pam_strerror(pamh, status));
+
+ DONE:
+ if (user) free (user);
+ if (pamh)
+ {
+ int status2 = pam_end (pamh, status);
+ pamh = 0;
+ if (verbose_p)
+ fprintf (stderr, "%s: pam_end (...) ==> %d (%s)\n",
+ blurb(), status2,
+ (status2 == PAM_SUCCESS ? "Success" : "Failure"));
+ }
+ return (status == PAM_SUCCESS ? True : False);
+}
+
+
+Bool
+pam_lock_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.
+ */
+ const char dir[] = "/etc/pam.d";
+ const char file[] = "/etc/pam.d/" PAM_SERVICE_NAME;
+ struct stat st;
+ if (stat (dir, &st) == 0 && st.st_mode & S_IFDIR)
+ 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());
+
+ /* Return true anyway, just in case. */
+ return True;
+}
+
+
+/* This is the function PAM calls to have a conversation with the user.
+ Really, this function should be the thing that pops up dialog boxes
+ as needed, and prompts for various strings.
+
+ But, for now, xscreensaver uses its normal password-prompting dialog
+ first, and then this function simply returns the result that has been
+ typed.
+
+ This means that if PAM was using a retina scanner for auth, xscreensaver
+ would prompt for a password; then pam_conversation() would be called
+ with a string like "Please look into the retina scanner". The user
+ would never see this string, and the prompted-for password would be
+ ignored.
+ */
+static int
+pam_conversation (int nmsgs,
+ const struct pam_message **msg,
+ struct pam_response **resp,
+ void *closure)
+{
+ int replies = 0;
+ struct pam_response *reply = 0;
+ struct pam_closure *c = (struct pam_closure *) closure;
+
+ reply = (struct pam_response *) calloc (nmsgs, sizeof (*reply));
+ if (!reply) return PAM_CONV_ERR;
+
+ for (replies = 0; replies < nmsgs; replies++)
+ {
+ switch (msg[replies]->msg_style)
+ {
+ case PAM_PROMPT_ECHO_ON:
+ reply[replies].resp_retcode = PAM_SUCCESS;
+ reply[replies].resp = strdup (c->user); /* freed by PAM */
+ if (c->verbose_p)
+ fprintf (stderr, "%s: PAM ECHO_ON(\"%s\") ==> \"%s\"\n",
+ blurb(), msg[replies]->msg,
+ reply[replies].resp);
+ break;
+ case PAM_PROMPT_ECHO_OFF:
+ reply[replies].resp_retcode = PAM_SUCCESS;
+ reply[replies].resp = strdup (c->typed_passwd); /* freed by PAM */
+ if (c->verbose_p)
+ fprintf (stderr, "%s: PAM ECHO_OFF(\"%s\") ==> password\n",
+ blurb(), msg[replies]->msg);
+ break;
+ case PAM_TEXT_INFO:
+ /* ignore it... */
+ reply[replies].resp_retcode = PAM_SUCCESS;
+ reply[replies].resp = 0;
+ if (c->verbose_p)
+ fprintf (stderr, "%s: PAM TEXT_INFO(\"%s\") ==> ignored\n",
+ blurb(), msg[replies]->msg);
+ break;
+ case PAM_ERROR_MSG:
+ /* ignore it... */
+ reply[replies].resp_retcode = PAM_SUCCESS;
+ reply[replies].resp = 0;
+ if (c->verbose_p)
+ fprintf (stderr, "%s: PAM ERROR_MSG(\"%s\") ==> ignored\n",
+ blurb(), msg[replies]->msg);
+ break;
+ default:
+ /* Must be an error of some sort... */
+ free (reply);
+ if (c->verbose_p)
+ fprintf (stderr, "%s: PAM unknown %d(\"%s\") ==> ignored\n",
+ blurb(), msg[replies]->msg_style, msg[replies]->msg);
+ return PAM_CONV_ERR;
+ }
+ }
+ *resp = reply;
+ return PAM_SUCCESS;
+}
+
+#endif /* NO_LOCKING -- whole file */
--- /dev/null
+/* passwd-pwent.c --- verifying typed passwords with the OS.
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifndef NO_LOCKING /* whole file */
+
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_CRYPT_H
+# include <crypt.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#ifndef VMS
+# include <pwd.h>
+# include <grp.h>
+#else /* VMS */
+# include "vms-pwd.h"
+#endif /* VMS */
+
+
+#ifdef __bsdi__
+# include <sys/param.h>
+# if _BSDI_VERSION >= 199608
+# define BSD_AUTH
+# endif
+#endif /* __bsdi__ */
+
+
+#if defined(HAVE_SHADOW_PASSWD) /* passwds live in /etc/shadow */
+
+# include <shadow.h>
+# define PWTYPE struct spwd *
+# define PWPSLOT sp_pwdp
+# define GETPW getspnam
+
+#elif defined(HAVE_ENHANCED_PASSWD) /* passwds live in /tcb/files/auth/ */
+ /* M.Matsumoto <matsu@yao.sharp.co.jp> */
+# include <sys/security.h>
+# include <prot.h>
+
+# define PWTYPE struct pr_passwd *
+# define PWPSLOT ufld.fd_encrypt
+# define GETPW getprpwnam
+
+#elif defined(HAVE_ADJUNCT_PASSWD)
+
+# include <sys/label.h>
+# include <sys/audit.h>
+# include <pwdadj.h>
+
+# define PWTYPE struct passwd_adjunct *
+# define PWPSLOT pwa_passwd
+# define GETPW getpwanam
+
+#elif defined(HAVE_HPUX_PASSWD)
+
+# include <hpsecurity.h>
+# include <prot.h>
+
+# define PWTYPE struct s_passwd *
+# define PWPSLOT pw_passwd
+# define GETPW getspwnam
+# define crypt bigcrypt
+
+#endif
+
+
+/* blargh */
+#undef Bool
+#undef True
+#undef False
+#define Bool int
+#define True 1
+#define False 0
+
+
+extern const char *blurb(void);
+
+static char *encrypted_root_passwd = 0;
+static char *encrypted_user_passwd = 0;
+
+#ifdef VMS
+# define ROOT "SYSTEM"
+#else
+# define ROOT "root"
+#endif
+
+
+
+#ifndef VMS
+
+static char *
+user_name (void)
+{
+ /* I think that just checking $USER here is not the best idea. */
+
+ const char *u = 0;
+
+ /* It has been reported that getlogin() returns the wrong user id on some
+ very old SGI systems... And I've seen it return the string "rlogin"
+ sometimes! Screw it, using getpwuid() should be enough...
+ */
+/* u = (char *) getlogin ();
+ */
+
+ /* getlogin() fails if not attached to a terminal; in that case, use
+ getpwuid(). (Note that in this case, we're not doing shadow stuff, since
+ all we're interested in is the name, not the password. So that should
+ still work. Right?) */
+ if (!u || !*u)
+ {
+ struct passwd *p = getpwuid (getuid ());
+ u = (p ? p->pw_name : 0);
+ }
+
+ return (u ? strdup(u) : 0);
+}
+
+#else /* VMS */
+
+static char *
+user_name (void)
+{
+ char *u = getenv("USER");
+ return (u ? strdup(u) : 0);
+}
+
+#endif /* VMS */
+
+
+static Bool
+passwd_known_p (const char *pw)
+{
+ return (pw &&
+ pw[0] != '*' && /* This would be sensible... */
+ strlen(pw) > 4); /* ...but this is what Solaris does. */
+}
+
+
+static char *
+get_encrypted_passwd(const char *user)
+{
+ char *result = 0;
+
+#ifdef PWTYPE
+ if (user && *user && !result)
+ { /* First check the shadow passwords. */
+ PWTYPE p = GETPW((char *) user);
+ if (p && passwd_known_p (p->PWPSLOT))
+ result = strdup(p->PWPSLOT);
+ }
+#endif /* PWTYPE */
+
+ if (user && *user && !result)
+ { /* Check non-shadow passwords too. */
+ struct passwd *p = getpwnam(user);
+ if (p && passwd_known_p (p->pw_passwd))
+ result = strdup(p->pw_passwd);
+ }
+
+ /* The manual for passwd(4) says:
+
+ Password aging is put in effect for a particular user if his
+ encrypted password in the password file is followed by a comma and
+ a nonnull string of characters from the above alphabet. This
+ string defines the "age" needed to implement password aging.
+
+ So this means that passwd->pw_passwd isn't simply a string of cyphertext,
+ it might have trailing junk. So, if there is a comma in the string, and
+ that comma is beyond position 13, terminate the string before the comma.
+ */
+ if (result && strlen(result) > 13)
+ {
+ char *s = strchr (result+13, ',');
+ if (s)
+ *s = 0;
+ }
+
+ if (!result)
+ fprintf (stderr, "%s: couldn't get password of \"%s\"\n",
+ blurb(), (user ? user : "(null)"));
+
+ return result;
+}
+
+
+
+/* This has to be called before we've changed our effective user ID,
+ because it might need privileges to get at the encrypted passwords.
+ Returns false if we weren't able to get any passwords, and therefore,
+ locking isn't possible. (It will also have written to stderr.)
+ */
+
+#ifndef VMS
+
+Bool
+pwent_lock_init (int argc, char **argv, Bool verbose_p)
+{
+ char *u;
+
+#ifdef HAVE_ENHANCED_PASSWD
+ set_auth_parameters(argc, argv);
+ check_auth_parameters();
+#endif /* HAVE_DEC_ENHANCED */
+
+ u = user_name();
+ encrypted_user_passwd = get_encrypted_passwd(u);
+ encrypted_root_passwd = get_encrypted_passwd(ROOT);
+ if (u) free (u);
+
+ if (encrypted_user_passwd)
+ return True;
+ else
+ return False;
+}
+
+
+/* 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.
+ */
+Bool
+pwent_passwd_valid_p (const char *typed_passwd, Bool verbose_p)
+{
+ char *s = 0; /* note that on some systems, crypt() may return null */
+
+ if (encrypted_user_passwd &&
+ (s = (char *) crypt (typed_passwd, encrypted_user_passwd)) &&
+ !strcmp (s, encrypted_user_passwd))
+ return True;
+
+ /* do not allow root to have a null password. */
+ else if (typed_passwd[0] &&
+ encrypted_root_passwd &&
+ (s = (char *) crypt (typed_passwd, encrypted_root_passwd)) &&
+ !strcmp (s, encrypted_root_passwd))
+ return True;
+
+ else
+ return False;
+}
+
+#else /* VMS */
+Bool pwent_lock_init (int argc, char **argv, Bool verbose_p) { return True; }
+#endif /* VMS */
+
+#endif /* NO_LOCKING -- whole file */
#ifndef NO_LOCKING /* whole file */
+#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#ifdef HAVE_CRYPT_H
-# include <crypt.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#ifndef VMS
-# include <pwd.h>
-# include <grp.h>
-#else /* VMS */
-# include "vms-pwd.h"
-#endif /* VMS */
-
-
-#ifdef __bsdi__
-# include <sys/param.h>
-# if _BSDI_VERSION >= 199608
-# define BSD_AUTH
-# endif
-#endif /* __bsdi__ */
-
-
-#if defined(HAVE_SHADOW_PASSWD) /* passwds live in /etc/shadow */
-
-# include <shadow.h>
-# define PWTYPE struct spwd *
-# define PWPSLOT sp_pwdp
-# define GETPW getspnam
-
-#elif defined(HAVE_ENHANCED_PASSWD) /* passwds live in /tcb/files/auth/ */
- /* M.Matsumoto <matsu@yao.sharp.co.jp> */
-# include <sys/security.h>
-# include <prot.h>
-
-# define PWTYPE struct pr_passwd *
-# define PWPSLOT ufld.fd_encrypt
-# define GETPW getprpwnam
-
-#elif defined(HAVE_ADJUNCT_PASSWD)
-
-# include <sys/label.h>
-# include <sys/audit.h>
-# include <pwdadj.h>
-
-# define PWTYPE struct passwd_adjunct *
-# define PWPSLOT pwa_passwd
-# define GETPW getpwanam
-
-#elif defined(HAVE_HPUX_PASSWD)
-
-# include <hpsecurity.h>
-# include <prot.h>
-
-# define PWTYPE struct s_passwd *
-# define PWPSLOT pw_passwd
-# define GETPW getspwnam
-# define crypt bigcrypt
-
-#endif
+extern char *blurb(void);
/* blargh */
#define True 1
#define False 0
+#undef countof
+#define countof(x) (sizeof((x))/sizeof(*(x)))
-extern const char *blurb(void);
+struct auth_methods {
+ const char *name;
+ Bool (*init) (int argc, char **argv, Bool verbose_p);
+ Bool (*valid_p) (const char *typed_passwd, Bool verbose_p);
+ Bool initted_p;
+};
-static char *encrypted_root_passwd = 0;
-static char *encrypted_user_passwd = 0;
-#ifdef VMS
-# define ROOT "SYSTEM"
-#else
-# define ROOT "root"
+#ifdef HAVE_KERBEROS
+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_passwd_valid_p (const char *typed_passwd, Bool verbose_p);
+#endif
+extern Bool pwent_lock_init (int argc, char **argv, Bool verbose_p);
+extern Bool pwent_passwd_valid_p (const char *typed_passwd, Bool verbose_p);
+/* The authorization methods to try, in order.
+ Note that the last one (the pwent version) is actually two auth methods,
+ since that code tries shadow passwords, and then non-shadow passwords.
+ (It's all in the same file since the APIs are randomly nearly-identical.)
+ */
+struct auth_methods methods[] = {
+# ifdef HAVE_KERBEROS
+ { "Kerberos", kerberos_lock_init, kerberos_passwd_valid_p, False },
+# endif
+# ifdef HAVE_PAM
+ { "PAM", pam_lock_init, pam_passwd_valid_p, False },
+# endif
+ { "normal", pwent_lock_init, pwent_passwd_valid_p, False }
+};
-#ifndef VMS
-static char *
-user_name (void)
+Bool
+lock_init (int argc, char **argv, Bool verbose_p)
{
- /* I think that just checking $USER here is not the best idea. */
-
- const char *u = 0;
-
- /* It has been reported that getlogin() returns the wrong user id on some
- very old SGI systems... And I've seen it return the string "rlogin"
- sometimes! Screw it, using getpwuid() should be enough...
- */
-/* u = (char *) getlogin ();
- */
-
- /* getlogin() fails if not attached to a terminal; in that case, use
- getpwuid(). (Note that in this case, we're not doing shadow stuff, since
- all we're interested in is the name, not the password. So that should
- still work. Right?) */
- if (!u || !*u)
+ int i;
+ Bool any_ok = False;
+ for (i = 0; i < countof(methods); i++)
{
- struct passwd *p = getpwuid (getuid ());
- u = (p ? p->pw_name : 0);
+ methods[i].initted_p = methods[i].init (argc, argv, verbose_p);
+ if (methods[i].initted_p)
+ any_ok = True;
+ else if (verbose_p)
+ fprintf (stderr, "%s: initialization of %s passwords failed.\n",
+ blurb(), methods[i].name);
}
-
- return (u ? strdup(u) : 0);
+ return any_ok;
}
-#else /* VMS */
-static char *
-user_name (void)
+Bool
+passwd_valid_p (const char *typed_passwd, Bool verbose_p)
{
- char *u = getenv("USER");
- return (u ? strdup(u) : 0);
-}
-
-#endif /* VMS */
-
-
-static Bool
-passwd_known_p (const char *pw)
-{
- return (pw &&
- pw[0] != '*' && /* This would be sensible... */
- strlen(pw) > 4); /* ...but this is what Solaris does. */
-}
-
-
-static char *
-get_encrypted_passwd(const char *user)
-{
- if (user && *user)
+ int i, j;
+ for (i = 0; i < countof(methods); i++)
{
-#ifdef PWTYPE
- { /* First check the shadow passwords. */
- PWTYPE p = GETPW((char *) user);
- if (p && passwd_known_p (p->PWPSLOT))
- return strdup(p->PWPSLOT);
- }
-#endif
- { /* Check non-shadow passwords too. */
- struct passwd *p = getpwnam(user);
- if (p && passwd_known_p (p->pw_passwd))
- return strdup(p->pw_passwd);
- }
+ if (methods[i].initted_p &&
+ methods[i].valid_p (typed_passwd, verbose_p))
+ {
+ /* If we successfully authenticated by method N, but attempting
+ to authenticate by method N-1 failed, mention that (since if
+ an earlier authentication method fails and a later one succeeds,
+ something screwy is probably going on.)
+ */
+ if (verbose_p)
+ {
+ for (j = 0; j < i; j++)
+ if (methods[j].initted_p)
+ fprintf (stderr,
+ "%s: authentication via %s passwords failed.\n",
+ blurb(), methods[j].name);
+ fprintf (stderr,
+ "%s: but authentication via %s passwords succeeded.\n",
+ blurb(), methods[i].name);
+ }
+
+ return True; /* Successfully authenticated! */
+ }
}
- fprintf (stderr, "%s: couldn't get password of \"%s\"\n",
- blurb(), (user ? user : "(null)"));
-
- return 0;
+ return False; /* Authentication failure. */
}
-
-
-/* This has to be called before we've changed our effective user ID,
- because it might need privileges to get at the encrypted passwords.
- Returns false if we weren't able to get any passwords, and therefore,
- locking isn't possible. (It will also have written to stderr.)
- */
-
-#ifndef VMS
-
-Bool
-lock_init (int argc, char **argv)
-{
- char *u;
-
-#ifdef HAVE_ENHANCED_PASSWD
- set_auth_parameters(argc, argv);
- check_auth_parameters();
-#endif /* HAVE_DEC_ENHANCED */
-
- u = user_name();
- encrypted_user_passwd = get_encrypted_passwd(u);
- encrypted_root_passwd = get_encrypted_passwd(ROOT);
- if (u) free (u);
-
- if (encrypted_user_passwd)
- return True;
- else
- return False;
-}
-
-
-/* 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.
- */
-Bool
-passwd_valid_p (const char *typed_passwd)
-{
- char *s = 0; /* note that on some systems, crypt() may return null */
-
- if (encrypted_user_passwd &&
- (s = (char *) crypt (typed_passwd, encrypted_user_passwd)) &&
- !strcmp (s, encrypted_user_passwd))
- return True;
-
- /* do not allow root to have a null password. */
- else if (typed_passwd[0] &&
- encrypted_root_passwd &&
- (s = (char *) crypt (typed_passwd, encrypted_root_passwd)) &&
- !strcmp (s, encrypted_root_passwd))
- return True;
-
- else
- return False;
-}
-
-#else /* VMS */
-Bool lock_init (int argc, char **argv) { return True; }
-#endif /* VMS */
-
#endif /* NO_LOCKING -- whole file */
Unless this hack was specified explicitly, in which case,
use it regardless.
*/
+ if (force)
+ select_visual_of_hack (ssi, hack);
+
if (!force &&
(!hack_enabled_p (hack) ||
!select_visual_of_hack (ssi, hack)))
itself.
*/
-#define WHICH 2
+#define WHICH 0
#ifdef HAVE_CONFIG_H
# include "config.h"
#include "xscreensaver.h"
#include "resources.h"
#include "version.h"
+#include "visual.h"
char *progname = 0;
char *progclass = 0;
set_auth_parameters(argc, argv);
# endif /* SCO */
- if (! lock_init (argc, argv)) /* before hack_uid() for proper permissions */
+ /* before hack_uid() for proper permissions */
+ if (! lock_init (argc, argv, True))
{
si->locking_disabled_p = True;
si->nolock_reason = "error getting password";
DefaultVisualOfScreen(si->default_screen->screen);
si->default_screen->screensaver_window =
RootWindowOfScreen(si->default_screen->screen);
+ si->default_screen->current_depth =
+ visual_depth(si->default_screen->screen,
+ si->default_screen->current_visual);
db = p->db;
XtGetApplicationNameAndClass (si->dpy, &progname, &progclass);
XSync (si->dpy, False);
sleep (1);
}
-#else
- make_screenhack_dialog (si);
- XtAppMainLoop(si->app);
#endif
}
}
reset_timers (saver_info *si)
{
saver_preferences *p = &si->prefs;
- if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
+ if (si->using_mit_saver_extension || si->using_sgi_saver_extension)
return;
#ifdef DEBUG_TIMERS
saver_preferences *p = &si->prefs;
Bool active_p = False;
- if (p->use_xidle_extension ||
- p->use_mit_saver_extension ||
- p->use_sgi_saver_extension)
+ if (si->using_xidle_extension ||
+ si->using_mit_saver_extension ||
+ si->using_sgi_saver_extension)
/* If an extension is in use, we should not be polling the mouse. */
abort ();
if (until_idle_p)
{
- if (!p->use_mit_saver_extension && !p->use_sgi_saver_extension)
+ if (!si->using_mit_saver_extension && !si->using_sgi_saver_extension)
{
/* Wake up periodically to ask the server if we are idle. */
si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer,
#endif /* DEBUG_TIMERS */
}
- if (!p->use_xidle_extension &&
- !p->use_mit_saver_extension &&
- !p->use_sgi_saver_extension)
+ if (!si->using_xidle_extension &&
+ !si->using_mit_saver_extension &&
+ !si->using_sgi_saver_extension)
/* start polling the mouse position */
check_pointer_timer ((XtPointer) si, 0);
}
{
Time idle;
#ifdef HAVE_XIDLE_EXTENSION
- if (p->use_xidle_extension)
+ if (si->using_xidle_extension)
{
if (! XGetIdleTime (si->dpy, &idle))
{
else
#endif /* HAVE_XIDLE_EXTENSION */
#ifdef HAVE_MIT_SAVER_EXTENSION
- if (p->use_mit_saver_extension)
+ if (si->using_mit_saver_extension)
{
/* We don't need to do anything in this case - the synthetic
event isn't necessary, as we get sent specific events
else
#endif /* HAVE_MIT_SAVER_EXTENSION */
#ifdef HAVE_SGI_SAVER_EXTENSION
- if (p->use_sgi_saver_extension)
+ if (si->using_sgi_saver_extension)
{
/* We don't need to do anything in this case - the synthetic
event isn't necessary, as we get sent specific events
if (idle >= p->timeout)
goto DONE;
- else if (!p->use_mit_saver_extension &&
- !p->use_sgi_saver_extension)
+ else if (!si->using_mit_saver_extension &&
+ !si->using_sgi_saver_extension)
{
si->timer_id = XtAppAddTimeOut (si->app, p->timeout - idle,
idle_timer, (XtPointer) si);
break;
case CreateNotify:
- if (!p->use_xidle_extension &&
- !p->use_mit_saver_extension &&
- !p->use_sgi_saver_extension)
+ if (!si->using_xidle_extension &&
+ !si->using_mit_saver_extension &&
+ !si->using_sgi_saver_extension)
{
start_notice_events_timer (si, event.xcreatewindow.window);
#ifdef DEBUG_TIMERS
printed_visual_info = True;
#ifdef HAVE_MIT_SAVER_EXTENSION
- if (p->use_mit_saver_extension)
+ if (si->using_mit_saver_extension)
{
XScreenSaverInfo *info;
Window root = RootWindowOfScreen (ssi->screen);
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "25-Oct-98 (3.02)" "X Version 11"
+.TH XScreenSaver 1 "15-Nov-98 (3.03)" "X Version 11"
.SH NAME
xscreensaver-command - control a running xscreensaver process
.SH SYNOPSIS
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "25-Oct-98 (3.02)" "X Version 11"
+.TH XScreenSaver 1 "15-Nov-98 (3.03)" "X Version 11"
.SH NAME
xscreensaver-demo - interactively control the background xscreensaver daemon
.SH SYNOPSIS
#include "yarandom.h"
#include "resources.h"
#include "visual.h"
+#include "usleep.h"
saver_info *global_si_kludge = 0; /* I hate C so much... */
si->nolock_reason = "not compiled with locking support";
#else /* !NO_LOCKING */
si->locking_disabled_p = False;
- if (! lock_init (*argc, argv)) /* before hack_uid() for proper permissions */
+ /* before hack_uid() for proper permissions */
+ if (! lock_init (*argc, argv, si->prefs.verbose_p))
{
si->locking_disabled_p = True;
si->nolock_reason = "error getting password";
Bool server_has_sgi_saver_extension_p = False;
Bool server_has_mit_saver_extension_p = False;
+ si->using_xidle_extension = p->use_xidle_extension;
+ si->using_sgi_saver_extension = p->use_sgi_saver_extension;
+ si->using_mit_saver_extension = p->use_mit_saver_extension;
+
#ifdef HAVE_XIDLE_EXTENSION
server_has_xidle_extension_p = query_xidle_extension (si);
#endif
#endif
if (!server_has_xidle_extension_p)
- p->use_xidle_extension = False;
+ si->using_xidle_extension = False;
else if (p->verbose_p)
{
- if (p->use_xidle_extension)
+ if (si->using_xidle_extension)
fprintf (stderr, "%s: using XIDLE extension.\n", blurb());
else
fprintf (stderr, "%s: not using server's XIDLE extension.\n", blurb());
}
if (!server_has_sgi_saver_extension_p)
- p->use_sgi_saver_extension = False;
+ si->using_sgi_saver_extension = False;
else if (p->verbose_p)
{
- if (p->use_sgi_saver_extension)
+ if (si->using_sgi_saver_extension)
fprintf (stderr, "%s: using SGI SCREEN_SAVER extension.\n", blurb());
else
fprintf (stderr,
}
if (!server_has_mit_saver_extension_p)
- p->use_mit_saver_extension = False;
+ si->using_mit_saver_extension = False;
else if (p->verbose_p)
{
- if (p->use_mit_saver_extension)
+ if (si->using_mit_saver_extension)
fprintf (stderr, "%s: using lame MIT-SCREEN-SAVER extension.\n",
blurb());
else
saver_preferences *p = &si->prefs;
int i;
- if (p->use_xidle_extension ||
- p->use_mit_saver_extension ||
- p->use_sgi_saver_extension)
+ if (si->using_xidle_extension ||
+ si->using_mit_saver_extension ||
+ si->using_sgi_saver_extension)
return;
if (p->initial_delay)
Bool
handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
{
- saver_preferences *p = &si->prefs;
Atom type = 0;
Window window = event->xclient.window;
"activating.");
si->selection_mode = 0;
si->demoing_p = False;
- if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
+ if (si->using_mit_saver_extension || si->using_sgi_saver_extension)
{
XForceScreenSaver (si->dpy, ScreenSaverActive);
return False;
clientmessage_response(si, window, False,
"DEACTIVATE ClientMessage received.",
"deactivating.");
- if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
+ if (si->using_mit_saver_extension || si->using_sgi_saver_extension)
{
XForceScreenSaver (si->dpy, ScreenSaverReset);
return False;
if (until_idle_p)
{
- if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
+ if (si->using_mit_saver_extension ||
+ si->using_sgi_saver_extension)
{
XForceScreenSaver (si->dpy, ScreenSaverActive);
return False;
server extension info
======================================================================= */
+ Bool using_xidle_extension; /* which extension is being used. */
+ Bool using_mit_saver_extension; /* Note that `p->use_*' is the *request*, */
+ Bool using_sgi_saver_extension; /* and `si->using_*' is the *reality*. */
+
# ifdef HAVE_MIT_SAVER_EXTENSION
int mit_saver_ext_event_number;
int mit_saver_ext_error_number;
#ifndef NO_LOCKING
extern Bool unlock_p (saver_info *si);
-extern Bool lock_init (int argc, char **argv);
-extern Bool passwd_valid_p (const char *typed_passwd);
+extern Bool lock_init (int argc, char **argv, Bool verbose_p);
+extern Bool passwd_valid_p (const char *typed_passwd, Bool verbose_p);
extern void make_passwd_window (saver_info *si);
extern void draw_passwd_window (saver_info *si);
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "25-Oct-98 (3.02)" "X Version 11"
+.TH XScreenSaver 1 "15-Nov-98 (3.03)" "X Version 11"
.SH NAME
xscreensaver - graphics hack and screen locker, launched when the user is idle
.SH SYNOPSIS
--- /dev/null
+#%PAM-1.0
+auth required /lib/security/pam_pwdb.so shadow nullok
"%s: SGI SCREEN_SAVER extension exists, but can't be initialized;\n\
perhaps some other screensaver program is already running?\n",
blurb());
- p->use_sgi_saver_extension = False;
+ si->using_sgi_saver_extension = False;
return;
}
}
on some systems that don't support XDPMS? Who know... */
desired_allow_exp = AllowExposures;
- if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
+ if (si->using_mit_saver_extension || si->using_sgi_saver_extension)
{
desired_server_timeout = (p->timeout / 1000);
/* The SGI extension won't give us events unless blanking is on.
I think (unsure right now) that the MIT extension is the opposite. */
- if (p->use_sgi_saver_extension)
+ if (si->using_sgi_saver_extension)
desired_prefer_blank = PreferBlanking;
else
desired_prefer_blank = DontPreferBlanking;
{
extension_initted = True;
# ifdef HAVE_MIT_SAVER_EXTENSION
- if (p->use_mit_saver_extension) init_mit_saver_extension(si);
+ if (si->using_mit_saver_extension) init_mit_saver_extension(si);
# endif
# ifdef HAVE_SGI_SAVER_EXTENSION
- if (p->use_sgi_saver_extension) init_sgi_saver_extension(si);
+ if (si->using_sgi_saver_extension) init_sgi_saver_extension(si);
# endif
}
}
}
/* I sure hope these only free the contents, and not the args. */
+#if 0 /* Apparently not? Gotta love those well-documented APIs! */
XpmFreeXpmImage (&xpm_image);
XpmFreeXpmInfo (&xpm_info);
+#endif
return ximage;
}
if (error->error_code == BadWindow || error->error_code == BadDrawable)
return 0;
else if (!old_ehandler)
- abort();
+ {
+ abort();
+ return 0;
+ }
else
return (*old_ehandler) (dpy, error);
}
static const char screensaver_id[] =
- "@(#)xscreensaver 3.02 (25-Oct-98), by Jamie Zawinski (jwz@jwz.org)";
+ "@(#)xscreensaver 3.03 (25-Oct-98), by Jamie Zawinski (jwz@jwz.org)";
return False;
default:
abort();
+ return False;
}
}
if (ScreenOfDisplay (dpy, i) == screen)
return i;
abort ();
+ return 0;
}
int
Begin3
Title: xscreensaver
-Version: 3.02
-Entered-date: 25OCT98
+Version: 3.03
+Entered-date: 15NOV98
Description: A modular screen saver and locker for the X Window System.
Highly customizable: allows the use of any program that
can draw on the root window as a display mode.
Author: jwz@jwz.org (Jamie Zawinski)
Maintained-by: jwz@jwz.org (Jamie Zawinski)
Primary-site: http://www.jwz.org/xscreensaver/
- 957K xscreensaver-3.02.tar.gz
- 24K xscreensaver.README
+ 962K xscreensaver-3.03.tar.gz
+ 25K xscreensaver.README
1K xscreensaver.lsm
Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
- 957K xscreensaver-3.02.tar.gz
- 24K xscreensaver.README
+ 962K xscreensaver-3.03.tar.gz
+ 25K xscreensaver.README
1K xscreensaver.lsm
Alternate-site: ftp.x.org /contrib/applications/
- 957K xscreensaver-3.02.tar.gz
- 24K xscreensaver.README
+ 962K xscreensaver-3.03.tar.gz
+ 25K xscreensaver.README
1K xscreensaver.lsm
Platforms: Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
BSDI, SCO, OSF1, Ultrix, VMS.