diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 27 | ||||
-rw-r--r-- | app-defaults/Beforelight (renamed from app-defaults/Beforelight.ad) | 0 | ||||
-rw-r--r-- | b4light.c | 14 | ||||
-rw-r--r-- | configure.ac | 14 |
5 files changed, 33 insertions, 26 deletions
@@ -19,3 +19,7 @@ install-sh missing stamp-h1 *~ +*.o +beforelight-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index b642131..477bdc3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,30 +31,21 @@ beforelight_SOURCES = \ appman_PRE = \ beforelight.man -# App default files (*.ad) +# App default files -EXTRA_DIST = \ - app-defaults/Beforelight.ad +DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults -APPDEFAULTFILES = \ - app-defaults/Beforelight - -SUFFIXES = .ad - -.ad: - $(mkdir_p) app-defaults - cp $< $@ +appdefaultdir = @appdefaultdir@ -appdefault_DATA = $(APPDEFAULTFILES) - -CLEANFILES = $(APPDEFAULTFILES) +dist_appdefault_DATA = \ + app-defaults/Beforelight appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -EXTRA_DIST += $(appman_PRE) -CLEANFILES += $(appman_DATA) +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) SED = sed @@ -75,7 +66,7 @@ MAN_SUBSTS = \ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' -SUFFIXES += .$(APP_MAN_SUFFIX) .man +SUFFIXES = .$(APP_MAN_SUFFIX) .man .man.$(APP_MAN_SUFFIX): sed $(MAN_SUBSTS) < $< > $@ @@ -86,6 +77,6 @@ MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/app-defaults/Beforelight.ad b/app-defaults/Beforelight index 64677a0..64677a0 100644 --- a/app-defaults/Beforelight.ad +++ b/app-defaults/Beforelight @@ -289,7 +289,7 @@ main(int argc, char *argv[]) XID kill_id; Atom kill_type; int i; - int (*oldHandler)(); + int (*oldHandler)(Display*, XErrorEvent*); Window r; int x, y; unsigned int w, h, b, d; @@ -348,9 +348,9 @@ main(int argc, char *argv[]) AllocateColors(); blank_pix = XCreatePixmap (display, root, 1, 1, 1); XScreenSaverRegister (display, screen, (XID) blank_pix, XA_PIXMAP); - bit_0_gc = XCreateGC (display, blank_pix, 0, 0); + bit_0_gc = XCreateGC (display, blank_pix, 0, NULL); XSetForeground (display, bit_0_gc, 0); - bit_1_gc = XCreateGC (display, blank_pix, 0, 0); + bit_1_gc = XCreateGC (display, blank_pix, 0, NULL); XSetForeground (display, bit_1_gc, ~0); XFillRectangle (display, blank_pix, bit_0_gc, 0, 0, 1, 1); info = XScreenSaverAllocInfo (); @@ -364,14 +364,14 @@ main(int argc, char *argv[]) mask |= CWCursor; XScreenSaverSetAttributes (display, root, 0, 0, DisplayWidth (display, screen), DisplayHeight(display, screen), 0, - CopyFromParent, CopyFromParent, CopyFromParent, mask, &attr); + CopyFromParent, CopyFromParent, (Visual *)CopyFromParent, mask, &attr); XSync (display, False); - gc = XCreateGC (display, root, 0, 0); - black_gc = XCreateGC (display, root, 0, 0); + gc = XCreateGC (display, root, 0, NULL); + black_gc = XCreateGC (display, root, 0, NULL); XSetForeground (display, black_gc, black_pixel); if (filled) { - erase_gc = XCreateGC (display, root, 0, 0); + erase_gc = XCreateGC (display, root, 0, NULL); XSetBackground (display, erase_gc, 0); XSetFunction (display, erase_gc, GXxor); XSetGraphicsExposures (display, erase_gc, False); diff --git a/configure.ac b/configure.ac index 87c327c..5b4ecea 100644 --- a/configure.ac +++ b/configure.ac @@ -26,21 +26,33 @@ AC_INIT(beforelight,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) + AM_CONFIG_HEADER(config.h) AC_PROG_CC AC_PROG_INSTALL +XORG_CWARNFLAGS + # Checks for pkg-config packages PKG_CHECK_MODULES(BEFORELIGHT, x11 xscrnsaver xt xaw7) +BEFORELIGHT_CFLAGS="$CWARNFLAGS $BEFORELIGHT_CFLAGS" AC_SUBST(BEFORELIGHT_CFLAGS) AC_SUBST(BEFORELIGHT_LIBS) PKG_CHECK_MODULES(APPDEFS, xt) -appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +AC_ARG_WITH(appdefaultdir, + AC_HELP_STRING([--with-appdefaultdir=<pathname>], + [specify directory for app-defaults files (default is autodetected)]), + [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) AC_SUBST(appdefaultdir) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) |