diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 27 | ||||
-rw-r--r-- | app-defaults/Xmessage (renamed from app-defaults/Xmessage.ad) | 0 | ||||
-rw-r--r-- | app-defaults/Xmessage-color (renamed from app-defaults/Xmessage-color.ad) | 0 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | makeform.c | 1 | ||||
-rw-r--r-- | xmessage.c | 6 |
7 files changed, 28 insertions, 24 deletions
@@ -20,3 +20,7 @@ stamp-h1 xmessage xmessage.1 *~ +*.o +xmessage-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index b068461..20543ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,34 +34,21 @@ xmessage_SOURCES = \ appman_PRE = \ xmessage.man -# App default files (*.ad) +# App default files +DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults appdefaultdir = @appdefaultdir@ - -APPDEFAULTFILES = \ +dist_appdefault_DATA = \ app-defaults/Xmessage \ app-defaults/Xmessage-color -SUFFIXES = .ad - -.ad: - $(mkdir_p) app-defaults - cp $< $@ - -appdefault_DATA = $(APPDEFAULTFILES) - -EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) Tests - -CLEANFILES = $(APPDEFAULTFILES) - - appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -EXTRA_DIST += $(appman_PRE) -CLEANFILES += $(appman_DATA) ChangeLog +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) ChangeLog MAINTAINERCLEANFILES = ChangeLog SED = sed @@ -83,7 +70,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) < $< > $@ @@ -91,6 +78,6 @@ SUFFIXES += .$(APP_MAN_SUFFIX) .man .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/Xmessage.ad b/app-defaults/Xmessage index 1028ed2..1028ed2 100644 --- a/app-defaults/Xmessage.ad +++ b/app-defaults/Xmessage diff --git a/app-defaults/Xmessage-color.ad b/app-defaults/Xmessage-color index 8d5f433..8d5f433 100644 --- a/app-defaults/Xmessage-color.ad +++ b/app-defaults/Xmessage-color diff --git a/configure.ac b/configure.ac index 89a8cf5..ce572d8 100644 --- a/configure.ac +++ b/configure.ac @@ -26,21 +26,33 @@ AC_INIT(xmessage,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xo 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(XMESSAGE, xaw7) +XMESSAGE_CFLAGS="$CWARNFLAGS $XMESSAGE_CFLAGS" AC_SUBST(XMESSAGE_CFLAGS) AC_SUBST(XMESSAGE_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]) @@ -91,6 +91,7 @@ parse_name_and_exit_code_list (char *buttonlist, ButtonRecord **brptr) int len; char *copy; + *brptr = NULL; if (!buttonlist) return 0; /* @@ -72,11 +72,11 @@ static XtResource resources[] = { { "nearMouse", "NearMouse", XtRBoolean, sizeof (Boolean), offset(nearmouse), XtRString, "false" }, { "timeout", "Timeout", XtRInt, sizeof (int), - offset(timeout_secs), XtRInt, 0 }, + offset(timeout_secs), XtRInt, NULL }, { "maxHeight", "Maximum", XtRDimension, sizeof (Dimension), - offset(maxHeight), XtRDimension, 0 }, + offset(maxHeight), XtRDimension, NULL }, { "maxWidth", "Maximum", XtRDimension, sizeof (Dimension), - offset(maxWidth), XtRDimension, 0 }, + offset(maxWidth), XtRDimension, NULL }, }; #undef offset |