AD_DIR = @APPDEFAULTS@
+PAM_DIR = /etc/pam.d
+PAM_CONF = /etc/pam.conf
UTILS_SRC = $(srcdir)/../utils
UTILS_BIN = ../utils
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
+TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c
TOOLKIT_SRCS = @TOOLKIT_SRCS@
TOOLKIT_OBJS = @TOOLKIT_OBJS@
LOCK_SRCS = @LOCK_SRCS@
LOCK_OBJS = @LOCK_OBJS@
+XMU_SRCS = @XMU_SRCS@
+XMU_OBJS = @XMU_OBJS@
+
+GL_SRCS = @SAVER_GL_SRCS@
+GL_OBJS = @SAVER_GL_OBJS@
+GL_LIBS = @SAVER_GL_LIBS@
+
DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
$(UTILS_SRC)/visual.c
DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
xset.o splash.o setuid.o stderr.o
SAVER_SRCS = $(SAVER_SRCS_1) prefs.c $(LOCK_SRCS) \
- $(SAVER_UTIL_SRCS) @XMU_SRCS@
+ $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
SAVER_OBJS = $(SAVER_OBJS_1) prefs.o $(LOCK_OBJS) \
- $(SAVER_UTIL_OBJS) @XMU_OBJS@
+ $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
CMD_SRCS = remote.c xscreensaver-command.c
CMD_OBJS = remote.o xscreensaver-command.o
DEMO_OBJS = $(DEMO_OBJS_1) remote.o \
$(TOOLKIT_OBJS) $(DEMO_UTIL_OBJS)
-SAVER_LIBS = $(LIBS) $(X_LIBS) @SAVER_LIBS@ \
+SAVER_LIBS = $(LIBS) $(X_LIBS) @SAVER_LIBS@ $(GL_LIBS) \
$(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
$(PASSWD_LIBS)
else \
e=echo ; \
$$e "" ;\
+ $$e " ####################################################################";\
$$e " Warning: xscreensaver has been compiled with support for shadow" ;\
$$e " passwords. If your system actually uses shadow passwords," ;\
$$e " then xscreensaver must be installed as a setuid root" ;\
$$e "" ;\
$$e " For now, xscreensaver will be installed non-setuid, which" ;\
$$e " means that locking might not work. (Try it and see.)" ;\
+ $$e " ####################################################################";\
$$e "" ;\
fi ; \
fi ; \
install-ad: XScreenSaver.ad
@if [ ! -d $(AD_DIR) ]; then $(INSTALL_DIRS) $(AD_DIR) ; fi
- $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver
+ @-echo $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver ; \
+ if $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver ; then \
+ true ; \
+ else \
+ e=echo ; \
+ if [ -f $(AD_DIR)/XScreenSaver ]; then \
+ $$e "" ;\
+ $$e " ####################################################################";\
+ $$e " Warning: unable to install $(AD_DIR)/XScreenSaver" ;\
+ $$e " That file exists, and is unwritable. It is probably from" ;\
+ $$e " an older version of xscreensaver, and could cause things" ;\
+ $$e " to malfunction. Please delete it!" ;\
+ $$e " ####################################################################";\
+ $$e "" ;\
+ exit 1 ; \
+ else \
+ $$e "" ;\
+ $$e " ####################################################################";\
+ $$e " Warning: unable to install $(AD_DIR)/XScreenSaver" ;\
+ $$e " The directory is unwritable. This is probably ok;" ;\
+ $$e " xscreensaver should work without that file." ;\
+ $$e " ####################################################################";\
+ $$e "" ;\
+ exit 0 ; \
+ fi \
+ fi
install-man: $(MEN)
@men="$(MEN)" ; \
@src="$(srcdir)/xscreensaver.pam" ; \
dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
< ../config.h` ; \
- dir=/etc/pam.d ; \
- conf=/etc/pam.conf ; \
+ dir="$(PAM_DIR)" ; \
+ conf="$(PAM_CONF)" ; \
\
if [ -d $$dir ] ; then \
echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
if [ ! -f $$dir/$$dest ]; then \
e=echo ; \
$$e "" ;\
+ $$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 " install the file $$dir/$$dest. PAM is unlikely" ;\
+ $$e " to work without this file (and old-style password" ;\
+ $$e " authentication will be used instead, which may or may not" ;\
+ $$e " work.)" ;\
+ $$e " ####################################################################";\
$$e "" ;\
fi ; \
elif [ -f $$conf ]; then \
else \
e=echo ; \
$$e "" ;\
+ $$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 " ####################################################################";\
$$e "" ;\
cat $$src | grep -v '#%' | sed "s/^/ $$dest /" ; \
echo ""; \
test-xdpms: test-xdpms.o
$(CC) $(LDFLAGS) -o $@ test-xdpms.o $(SAVER_LIBS)
+test-grab: test-grab.o
+ $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
+
# This kludge is so that I can build/test the Athena version of the
# xscreensaver-demo program without having to re-run configure.
test-passwd.o: XScreenSaver_ad.h
test-uid.o: ../config.h
test-xdpms.o: ../config.h
+test-grab.o: ../config.h