diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 28 | ||||
-rw-r--r-- | app-defaults/XFontSel (renamed from app-defaults/XFontSel.ad) | 0 | ||||
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | xfontsel.c | 42 |
5 files changed, 46 insertions, 43 deletions
@@ -19,3 +19,7 @@ stamp-h1 xfontsel xfontsel.1 *~ +*.o +xfontsel-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 36392d9..fb9b9ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,33 +33,20 @@ xfontsel_SOURCES = \ appman_PRE = \ xfontsel.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/XFontSel -SUFFIXES = .ad - -.ad: - [ -d app-defaults ] || mkdir app-defaults - cp $< $@ - -appdefault_DATA = $(APPDEFAULTFILES) - -EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) ChangeLog autogen.sh - -CLEANFILES = $(APPDEFAULTFILES) - - 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 @@ -80,16 +67,17 @@ 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) < $< > $@ +EXTRA_DIST += ChangeLog 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/XFontSel.ad b/app-defaults/XFontSel index 73c4854..73c4854 100644 --- a/app-defaults/XFontSel.ad +++ b/app-defaults/XFontSel diff --git a/configure.ac b/configure.ac index 7e2b568..601e66c 100644 --- a/configure.ac +++ b/configure.ac @@ -26,21 +26,32 @@ AC_INIT(xfontsel,[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 -PKG_CHECK_MODULES(XFONTSEL, xaw7) +XORG_CWARNFLAGS +PKG_CHECK_MODULES(XFONTSEL, xaw7) +XFONTSEL_CFLAGS="$CWARNFLAGS $XFONTSEL_CFLAGS" AC_SUBST(XFONTSEL_CFLAGS) AC_SUBST(XFONTSEL_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]) @@ -83,11 +83,11 @@ void EnableMenu(XtPointer closure); void SetCurrentFont(XtPointer closure); void QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params); -XtActionsRec xfontsel_actions[] = { +static XtActionsRec xfontsel_actions[] = { {"Quit", QuitAction} }; -Atom wm_delete_window; +static Atom wm_delete_window; Boolean IsXLFDFontName(String fontName); @@ -234,28 +234,28 @@ static void SetCurrentFontCount(void); static void SetNoFonts(void); static void SetParsingFontCount(int count); -XtAppContext appCtx; -int numFonts; -int numBadFonts; -FontValues *fonts; -int *scaledFonts; -int numScaledFonts; -FieldValueList *fieldValues[FIELD_COUNT]; -FontValues currentFont; -int matchingFontCount; +static XtAppContext appCtx; +static int numFonts; +static int numBadFonts; +static FontValues *fonts; +static int *scaledFonts; +static int numScaledFonts; +static FieldValueList *fieldValues[FIELD_COUNT]; +static FontValues currentFont; +static int matchingFontCount; static Boolean anyDisabled = False; -Widget ownButton; -Widget fieldBox; -Widget countLabel; -Widget currentFontName; -String currentFontNameString; -int currentFontNameSize; -Widget sampleText; -int textEncoding = -1; +static Widget ownButton; +static Widget fieldBox; +static Widget countLabel; +static Widget currentFontName; +static String currentFontNameString; +static int currentFontNameSize; +static Widget sampleText; +static int textEncoding = -1; static XFontStruct *sampleFont = NULL; -Boolean *fontInSet; +static Boolean *fontInSet; static Choice *choiceList = NULL; -int enabledMenuIndex; +static int enabledMenuIndex; static Boolean patternFieldSpecified[FIELD_COUNT]; /* = 0 */ int |